init
This commit is contained in:
18
app/internal/infr/env/init.go
vendored
Normal file
18
app/internal/infr/env/init.go
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
// Package env provides environment variables
|
||||
package env
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"github.com/joho/godotenv"
|
||||
)
|
||||
|
||||
// SetupEnvFile is a function to setup .env file
|
||||
func SetupEnvFile() {
|
||||
envFile := ".env"
|
||||
var err error
|
||||
if (godotenv.Load(envFile)); err != nil {
|
||||
log.Printf("No %s file found, reading from environment", envFile)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user