Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 845 Bytes

README.md

File metadata and controls

31 lines (21 loc) · 845 Bytes

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())
	}
}