Load .env from executable path

This commit is contained in:
Illya Marchenko 2024-10-08 16:03:55 +03:00
parent aaa155ca2f
commit d046d06e61
Signed by: stuzer05
GPG Key ID: A6ABAAA9268F9F4F

View File

@ -19,11 +19,7 @@ func main() {
exeDir := filepath.Dir(exePath)
// Load .env file
err = godotenv.Load(filepath.Join(exeDir, ".env"))
if err != nil {
fmt.Println("Error loading .env file:", err)
return
}
godotenv.Load(filepath.Join(exeDir, ".env"))
// Initialize app
app, err := app.NewApp()