Documentation ¶
Overview ¶
Package flag defines the standard interface for command-line flag parsing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockParser ¶
MockParser is a test mock for the Parser interface.
func (*MockParser) Parse ¶
func (m *MockParser) Parse(args []string, v interface{}) error
type Parser ¶
type Parser interface { // Parse parses the command-line arguments provided by args into v, which // typically should be a pointer to a struct, but the exact behaviour is // implementation-specific. The args slice should have the program name // in position 0, as is the case when read from os.Args. Parse(args []string, v interface{}) error }
Parser defines the method to implement to parse command-line arguments.
Click to show internal directories.
Click to hide internal directories.