Template
1
0
Fork 0

Refactor environment variable loading in main.go

This commit is contained in:
Atridad Lahiji 2024-01-26 14:57:04 -07:00
parent 983c11a162
commit dfc7aa009c
No known key found for this signature in database

View file

@ -1,8 +1,6 @@
package main
import (
"log"
"github.com/joho/godotenv"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
@ -13,10 +11,7 @@ import (
func main() {
// Load environment variables
err := godotenv.Load(".env")
if err != nil {
log.Fatal("Error loading .env file")
}
godotenv.Load(".env")
// Initialize Echo router
e := echo.New()