Skip to content

daemonl/envconf.go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Configure struct from environment variables

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages