README ¶ go-dotenv A dotenv built with golang. Installation go get github.com/bmf-san/go-dotenv Get Started Add a .env file in your project. FOO=foo BAR=bar Then you can load env file like this. package main import ( "fmt" "os" "github.com/bmf-san/go-dotenv" ) func main() { if err := dotenv.LoadEnv(); err != nil { fmt.Printf("%s", err) } fmt.Println(os.Getenv("FOO")) // foo fmt.Println(os.Getenv("BAR")) // bar } Expand ▾ Collapse ▴ Documentation ¶ Index ¶ func LoadEnv(filenames ...string) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func LoadEnv ¶ func LoadEnv(filenames ...string) error LoadEnv load env variables from .env. Types ¶ This section is empty. Source Files ¶ View all Source files dotenv.go Click to show internal directories. Click to hide internal directories.