Skip to content

Read environment configuration values into a tagged struct.

License

Notifications You must be signed in to change notification settings

hyperworks/go-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GO-CONFIG

Simple configuration reader that utilizes struct tags and reads into a pre-defined strongly-typed struct.

import "github.com/hyperworks/go-config"

See the file example/main.go for an example.

EXAMPLE

$ export CFG_ENV=test
$ export CFG_DRIVER=mysql
$ export CFG_DB=/tmp/mysql.sock
$
$ go run $GOPATH/src/github.com/hyperworks/go-config/example/main.go
{
	"Env": "test",
	"DBDriver": "mysql",
	"DBURL": "/tmp/mysql.sock"
}

About

Read environment configuration values into a tagged struct.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages