Documentation ¶
Index ¶
- type ParseResult
- func (slf *ParseResult) GetBoolFlag(key string) (*bool, error)
- func (slf *ParseResult) GetFloatFlag(key string) (*float64, error)
- func (slf *ParseResult) GetFloatIndex(idx int) (*float64, error)
- func (slf *ParseResult) GetIntFlag(key string) (*int, error)
- func (slf *ParseResult) GetIntIndex(idx int) (*int, error)
- func (slf *ParseResult) GetStringFlag(key string) (*string, error)
- func (slf *ParseResult) GetStringIndex(idx int) (*string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ParseResult ¶
A datastructure representing the result from parsing input.
func ParseFromSlice ¶
func ParseFromSlice(input []string) *ParseResult
Parse args from string slice `input` If you're unsure about the correctness of your input, see parse.toFilteredSlice(string) for more information.
func ParseFromString ¶
func ParseFromString(input string) *ParseResult
Parse arguments from a string. The input string is preprocessed with respect to strings within the input string. see parse.toFilteredSlice(string) for more information.
func (*ParseResult) GetBoolFlag ¶
func (slf *ParseResult) GetBoolFlag(key string) (*bool, error)
Get a bool from the parsed flags by some key `key`
func (*ParseResult) GetFloatFlag ¶
func (slf *ParseResult) GetFloatFlag(key string) (*float64, error)
Get a float from the parsed flags by some key `key`
func (*ParseResult) GetFloatIndex ¶
func (slf *ParseResult) GetFloatIndex(idx int) (*float64, error)
Get a float from the parsed positional arguments according to some index `idx`
func (*ParseResult) GetIntFlag ¶
func (slf *ParseResult) GetIntFlag(key string) (*int, error)
Get an int from the parsed flags by some key `key`
func (*ParseResult) GetIntIndex ¶
func (slf *ParseResult) GetIntIndex(idx int) (*int, error)
Get an int from the parsed positional arguments according to some index `idx`
func (*ParseResult) GetStringFlag ¶
func (slf *ParseResult) GetStringFlag(key string) (*string, error)
Get a string from the parsed flags by some key `key`
func (*ParseResult) GetStringIndex ¶
func (slf *ParseResult) GetStringIndex(idx int) (*string, error)
Get a string from the parsed positional arguments according to some index `idx`