flags

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrHelp is returned when the -h or --help flags are used.
	ErrHelp = errors.New("help requested")
	// ErrVersion is returned when the -v or --version flags are used.
	ErrVersion = errors.New("version requested")
)

Functions

This section is empty.

Types

type FlagSet

type FlagSet struct {
	*flag.FlagSet
	// contains filtered or unexported fields
}

FlagSet embeds a flags.FlagSet for the purposes of defining flags at runtime using reflection and the struct passed to the Parse function.

func New

func New() *FlagSet

New instantiates an empty usable flagset ready for parsing.

func (*FlagSet) Parse

func (f *FlagSet) Parse(i interface{}) error

Parse implements the config.Provider interface.

Jump to

Keyboard shortcuts

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