Documentation ¶
Index ¶
Constants ¶
View Source
const NoDescription = "No description"
Variables ¶
View Source
var Prefix = "ENV_"
Functions ¶
func DumpConfig ¶
func ProcessConfig ¶
ProcessConfig automaticaly read flags and ENVs to structure.
config - must be a pointer to structure
var Config struct { Deployment string `default:"development"` Host string `default:"127.0.0.1"` Port string `default:"8080"` } func init() { if err := penv.ProcessConfig(&Config); err != nil { panic(err) } }
Types ¶
Click to show internal directories.
Click to hide internal directories.