dotenv dotenv is a module to load environment variables from a .env files. Features Simplest API. Dependency-free. Install Go version 1.13 go get github.com/cristalhq/dotenv Example errLoad := dotenv.Load("my_dev.env") if errLoad != nil { os.Exit(1) } Documentation See these docs. License MIT License.