Restructured - new game changer

This commit is contained in:
PB
2025-10-26 19:20:59 +01:00
parent 2ac68aed86
commit 65105d6982
9 changed files with 49 additions and 61 deletions

22
config/env.go Normal file
View File

@@ -0,0 +1,22 @@
package config
import (
"os"
"github.com/joho/godotenv"
)
var ErrLoadingEnvs error
func init() {
ErrLoadingEnvs = godotenv.Load()
}
func GetEnv(name string, defVal string) string {
env := os.Getenv(name)
if env == "" {
return defVal
}
return env
}