Rehabilitate tests

This commit is contained in:
lash
2025-01-08 22:27:19 +00:00
parent ddefdd7fb3
commit df8c9aab0c
9 changed files with 16 additions and 43 deletions

View File

@@ -9,9 +9,13 @@ import (
"github.com/joho/godotenv"
)
func LoadEnvVariables(baseDir string) {
envDir := path.Join(baseDir, ".env")
err := godotenv.Load(envDir)
func LoadEnvVariables() {
LoadEnvVariablesPath(".")
}
func LoadEnvVariablesPath(dir string) {
fp := path.Join(dir, ".env")
err := godotenv.Load(fp)
if err != nil {
log.Fatal("Error loading .env file", err)
}