flag

package
v1.4.8-beta.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitFlags

func InitFlags()

InitFlags normalizes and parses the command line flags

func WarnWordSepNormalizeFunc

func WarnWordSepNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName

WarnWordSepNormalizeFunc changes and warns for flags that contain "_" separators

func WordSepNormalizeFunc

func WordSepNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName

WordSepNormalizeFunc changes all flags that contain "_" separators

Types

type Tristate

type Tristate int

Tristate is a flag compatible with flags and pflags that keeps track of whether it had a value supplied or not.

const (
	Unset Tristate = iota // 0
	True
	False
)

func (*Tristate) Default

func (f *Tristate) Default(value bool)

func (Tristate) Provided

func (f Tristate) Provided() bool

func (*Tristate) Set

func (f *Tristate) Set(value string) error

func (Tristate) String

func (f Tristate) String() string

func (*Tristate) Type

func (f *Tristate) Type() string

func (Tristate) Value

func (f Tristate) Value() bool

Jump to

Keyboard shortcuts

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