flag

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 29, 2020 License: Apache-2.0 Imports: 6 Imported by: 18

Documentation

Index

Constants

View Source
const (
	ConfigFalse configValue = 0
	ConfigTrue  configValue = 1
)

Variables

This section is empty.

Functions

func AddFlags added in v1.2.0

func AddFlags(fs *pflag.FlagSet)

AddFlags registers this package's flags on arbitrary FlagSets, such that they point to the same value as the global flags.

func Config added in v1.2.0

func Config(name string, value configValue, usage string) *configValue

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 PrintFlags

func PrintFlags(flags *pflag.FlagSet)

PrintFlags logs the flags in the flagset

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

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL