Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFlags ¶
AddFlags registers this package's flags on arbitrary FlagSets, such that they point to the same value as the global flags.
func ConfigVar ¶
func ConfigVar(p *ConfigValue, name string, value ConfigValue, usage string)
func PrintDefaultConfigAndExitIfRequested ¶
func PrintDefaultConfigAndExitIfRequested(config interface{})
PrintDefaultConfigAndExitIfRequested will check if the -defaultconfig flag was passed and, if so, print the default config and exit.
func PrintMinConfigAndExitIfRequested ¶
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 ¶
type ConfigValue int
const ( ConfigFalse ConfigValue = 0 ConfigTrue ConfigValue = 1 )
func Config ¶
func Config(name string, value ConfigValue, usage string) *ConfigValue
func (*ConfigValue) Get ¶
func (m *ConfigValue) Get() interface{}
func (*ConfigValue) IsBoolFlag ¶
func (m *ConfigValue) IsBoolFlag() bool
func (*ConfigValue) Set ¶
func (m *ConfigValue) Set(s string) error
func (*ConfigValue) String ¶
func (m *ConfigValue) String() string
func (*ConfigValue) Type ¶
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.