Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindConfig ¶
BindConfig creates cobra flags based on cfg, which must be a pointer to a configuration struct. Struct is then populated from flags -> env variables -> configuration file in this order. Configuration file must be named as the cmd name with one of the extensions supported by viper.
Types ¶
type Option ¶
type Option func(*options)
Option is a type for options.
func WithStrict ¶
WithStrict enables the strict mode for configuration binding. This means that binding will fail if specified configuration file doesn't exist.
Click to show internal directories.
Click to hide internal directories.