+ Tag a config to remind them to stay hydrated
import "github.com/JoelPagliuca/conman"
var myAppConfig struct {
Port string `cmssm:"/Prod/app/port" 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 - your AWS SSM Parameter value set in
/Prod/app/port
- then default to
8080
Check the godoc for more
Shout out to my boy Marcus for the project name ❤️