Documentation ¶
Index ¶
- Constants
- Variables
- func Info() string
- func Version() string
- type Flag
- type FlagValue
- type Flags
- func (f *Flags) AddHelp(txt string, msg string) error
- func (f *Flags) AddVersion(txt string, msg string) error
- func (f *Flags) Bool(usage string, flgs ...string) *bool
- func (f *Flags) BoolVar(b *bool, usage string, flgs ...string)
- func (f Flags) Help(msg string)
- func (f *Flags) Int(def int, usage string, flgs ...string) *int
- func (f *Flags) IntVar(i *int, def int, usage string, flgs ...string)
- func (f *Flags) Parse(flags []string) ([]string, error)
- func (f *Flags) String(def string, usage string, flgs ...string) *string
- func (f *Flags) StringVar(s *string, def string, usage string, flgs ...string)
- func (f *Flags) Uint(def uint, usage string, flgs ...string) *uint
- func (f *Flags) UintVar(i *uint, def uint, usage string, flgs ...string)
- func (f Flags) Usage(usage string, msg string)
- type Getter
Constants ¶
View Source
const ( // NAME of flagger NAME = "flagger" // MAJORVERSION of flagger MAJORVERSION = "1" // MINORVERSION of flagger MINORVERSION = "1" // VERSIONTAG of flagger VERSIONTAG = "2" // DESCRIPTION of flagger DESCRIPTION = "Flag handler written in Go" )
Variables ¶
View Source
var ( // ErrNoFlags is the error returned when no flags are passed. // Useful as a check for when you want to proceed without flags. ErrNoFlags = errors.New("No flags passed") ErrBadFlag = errors.New("invalid flag") ErrBadValue = errors.New("invalid value") ErrNoValue = errors.New("missing operand") ErrHelp = errors.New("Help") ErrVersion = errors.New("Version") )
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.