Documentation ¶
Index ¶
Constants ¶
View Source
const ( // RequiredArgumentMissing is used when a required argument is missing. RequiredArgumentMissing = iota // InsufficientArguments is used when at least one greedy argument is required. InsufficientArguments // InvalidArgument is used when an invalid input is used for an argument. InvalidArgument )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Argument ¶
Argument is information about an argument and how to process it.
func (*Argument) DisplayName ¶
DisplayName is the user friendly appearance of an argument.
type ParsedArguments ¶
type ParsedArguments = map[string]interface{}
ParsedArguments is a map of arguments using the name of the argument as the key.
type ParsingError ¶
type ParsingError struct { ErrorType int // contains filtered or unexported fields }
ParsingError is an error in argument transformation.
func NewParsingError ¶
func NewParsingError(arg *Argument, errorType int) *ParsingError
NewParsingError creates an argument parsing error that's user friendly.
func (*ParsingError) Error ¶
func (err *ParsingError) Error() string
func (*ParsingError) UIError ¶
func (err *ParsingError) UIError() string
UIError is an error string suitable for sending to the user.
Click to show internal directories.
Click to hide internal directories.