From f1e987f4b8f031c15bafd18a7a454dd92b7832e9 Mon Sep 17 00:00:00 2001 From: stuzer05 Date: Wed, 2 Oct 2024 23:04:32 +0300 Subject: [PATCH] Remove env path hardcode --- main.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/main.go b/main.go index a7d2e8a..2f3c41f 100644 --- a/main.go +++ b/main.go @@ -2,20 +2,15 @@ package main import ( "fmt" - "os" - "path/filepath" - "runtime" - "gitea.stuzer.link/stuzer05/docker-registry-manager/cmd" "gitea.stuzer.link/stuzer05/docker-registry-manager/internal/app" - "github.com/joho/godotenv" + "os" ) func main() { // Load .env file - _, b, _, _ := runtime.Caller(0) - err := godotenv.Load(filepath.Join(filepath.Dir(b), ".env")) + err := godotenv.Load() if err != nil { fmt.Println("Error loading .env file:", err) return