Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFlags ¶ added in v1.2.0
AddFlags registers this package's flags on arbitrary FlagSets, such that they point to the same value as the global flags.
func ConfigVar ¶ added in v1.2.0
func ConfigVar(p *ConfigValue, name string, value ConfigValue, usage string)
func PrintDefaultConfigAndExitIfRequested ¶ added in v1.2.0
func PrintDefaultConfigAndExitIfRequested(config interface{})
PrintDefaultConfigAndExitIfRequested will check if the -defaultconfig flag was passed and, if so, print the default config and exit.
func PrintMinConfigAndExitIfRequested ¶ added in v1.2.0
func PrintMinConfigAndExitIfRequested(config interface{})
PrintMinConfigAndExitIfRequested will check if the -minconfig flag was passed and, if so, print the min config and exit.
Types ¶
type ConfigValue ¶ added in v1.4.0
type ConfigValue int
const ( ConfigFalse ConfigValue = 0 ConfigTrue ConfigValue = 1 )
func Config ¶ added in v1.2.0
func Config(name string, value ConfigValue, usage string) *ConfigValue
func (*ConfigValue) Get ¶ added in v1.4.0
func (m *ConfigValue) Get() interface{}
func (*ConfigValue) IsBoolFlag ¶ added in v1.4.0
func (m *ConfigValue) IsBoolFlag() bool
func (*ConfigValue) Set ¶ added in v1.4.0
func (m *ConfigValue) Set(s string) error
func (*ConfigValue) String ¶ added in v1.4.0
func (m *ConfigValue) String() string
func (*ConfigValue) Type ¶ added in v1.4.0
func (m *ConfigValue) Type() string
The type of the flag as required by the pflag.Value interface
Click to show internal directories.
Click to hide internal directories.