flag

package
v1.7.0-alpha.1....-57688bb Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitFlags

func InitFlags()

InitFlags normalizes, parses, then logs 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 ConfigurationMap

type ConfigurationMap map[string]string

func (*ConfigurationMap) Set

func (m *ConfigurationMap) Set(value string) error

func (*ConfigurationMap) String

func (m *ConfigurationMap) String() string

func (*ConfigurationMap) Type

func (*ConfigurationMap) Type() string

type NamedCertKey

type NamedCertKey struct {
	Names             []string
	CertFile, KeyFile string
}

NamedCertKey is a flag value parsing "certfile,keyfile" and "certfile,keyfile:name,name,name".

func (*NamedCertKey) Set

func (nkc *NamedCertKey) Set(value string) error

func (*NamedCertKey) String

func (nkc *NamedCertKey) String() string

func (*NamedCertKey) Type

func (*NamedCertKey) Type() string

type NamedCertKeyArray

type NamedCertKeyArray struct {
	// contains filtered or unexported fields
}

NamedCertKeyArray is a flag value parsing NamedCertKeys, each passed with its own flag instance (in contrast to comma separated slices).

func NewNamedCertKeyArray

func NewNamedCertKeyArray(p *[]NamedCertKey) *NamedCertKeyArray

NewNamedKeyCertArray creates a new NamedCertKeyArray with the internal value pointing to p.

func (*NamedCertKeyArray) Set

func (a *NamedCertKeyArray) Set(val string) error

func (*NamedCertKeyArray) String

func (a *NamedCertKeyArray) String() string

func (*NamedCertKeyArray) Type

func (a *NamedCertKeyArray) Type() string

type StringFlag

type StringFlag struct {
	// contains filtered or unexported fields
}

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

func NewStringFlag

func NewStringFlag(defaultVal string) StringFlag

func (*StringFlag) Default

func (f *StringFlag) Default(value string)

func (StringFlag) Provided

func (f StringFlag) Provided() bool

func (*StringFlag) Set

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

func (StringFlag) String

func (f StringFlag) String() string

func (*StringFlag) Type

func (f *StringFlag) Type() string

func (StringFlag) Value

func (f StringFlag) Value() string

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