Documentation ¶
Overview ¶
Package envflags package houses the SetFlags and ConfigEmpty methods for conveniently specifiying config via a single struct. Using tags on the struct fields, both the cli flag option name and environment variable name can be specified it can be specified. Environment variable values will be defaults, with cli options taking preference if specified.
example struct:
type config struct { StructField string `flag:"struct_field" env:"APP_STRUCTFIELD"` }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigEmpty ¶
func ConfigEmpty(s interface{}) bool
ConfigEmpty takes a config struct and determines if any of its field's values are their zero value, meaning that their associated config flag and environment variable were not specified.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.