Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 918 Bytes

README.md

File metadata and controls

29 lines (23 loc) · 918 Bytes

Conman

+ Tag a config to remind them to stay hydrated

Godoc reference GitHub go.mod Go version GitHub tag (latest SemVer)

Quickstart

import "github.com/JoelPagliuca/conman"

var myAppConfig struct {
	Port string `cmenv:"PORT" cmdefault:"8080"`
}

func init() {
	cm, _ := conman.New()
	cm.Hydrate(&myAppConfig)
}

This will try to set myAppConfig.Port to:

  • your PORT environment variable if it is set
  • then default to 8080

Check the godoc for more

Shout out to Marcus for the project name ❤️