Skip to content
Configure struct from environment variables
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis.yml
LICENCE
README.md
envconf.go
envconf_test.go

README.md

Build Status GoDoc codecov

Env Conf

Environment Variable config loader for go

The import path "gopkg.daemonl.com/envconf" is equivalent to "github.com/daemonl/envconf.go", but some tools aren't keen on the .go suffix. (And what if I wanted to write this for another language?)

Simple Usage


import "gopkg.daemonl.com/envconf"

var config struct {
	Bind string `env:"BIND" default:":8080"`
}

func main() {
	if err := envconf.Parse(&config); err != nil {
		log.Fatal(err.Error())
	}
}
You can’t perform that action at this time.