Documentation
¶
Overview ¶
Package cl parses command line arguments.
Index ¶
- type Arguments
- func (clArgs *Arguments) Argument(argVariants ...string) *Result
- func (clArgs *Arguments) ArgumentByDelimiter(delimiter []string, argVariants ...string) *Result
- func (clArgs *Arguments) Available() bool
- func (clArgs *Arguments) Count() int
- func (clArgs *Arguments) InitMeta()
- func (clArgs *Arguments) Rest() *Result
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Arguments ¶
Arguments holds command line arguments.
func NewCLArgs ¶
func NewCLArgs() *Arguments
NewCLArgs creates and returns a new instance of Arguments. Arguments have all command line arguments except the first one, which is the program name.
func (*Arguments) ArgumentByDelimiter ¶
ArgumentByDelimiter returns matches of different argument variations splitted by delimiter. First part of the split goes in Arguments.Params, the second in Arguments.Values. Space (" ") as delimiter does not split, but treats two arguments as one.
Click to show internal directories.
Click to hide internal directories.