From 543a5ad36726f8ffdc5440d4a5ab6577628463f5 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Fri, 12 Apr 2024 10:02:12 +0200 Subject: [PATCH] load dotenv files --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index 2fd1c58..82a4418 100644 --- a/main.go +++ b/main.go @@ -43,4 +43,9 @@ type Rectangle struct { } func main() { + // Load .env file if it exists + err := godotenv.Load(".env") + if err != nil { + log.Fatal("Error loading .env file") + } }