Since is not a standard, default file name in the Go ecosystem (unlike .env or .env.local ), this guide assumes you are looking to implement a specific configuration pattern: Managing local environment variables for a Go application using a .env file.
# Database configuration DB_HOST=localhost DB_PORT=5432 DB_USER=myuser DB_PASSWORD=mypassword DB_NAME=mydb .env.go.local