update app
This commit is contained in:
19
config/env.go
Normal file
19
config/env.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/joho/godotenv"
|
||||
)
|
||||
|
||||
func LoadEnv() {
|
||||
err := godotenv.Load()
|
||||
if err != nil {
|
||||
log.Fatalf("Error loading .env file")
|
||||
}
|
||||
}
|
||||
|
||||
func GetEnv(key string) string {
|
||||
return os.Getenv(key)
|
||||
}
|
||||
Reference in New Issue
Block a user