Documentation ¶
Index ¶
- type ArgumentHandler
- func (handler *ArgumentHandler) Add(long_name string, short_name string, needs_value bool, required bool, ...)
- func (handler *ArgumentHandler) AddFunction(long_name string, short_name string, needs_value bool, required bool, ...)
- func (handler *ArgumentHandler) AddFunctionOptions(long_name string, short_name string, needs_value bool, required bool, ...)
- func (handler *ArgumentHandler) AddOptions(long_name string, short_name string, needs_value bool, required bool, ...)
- func (handler *ArgumentHandler) Help(ignore_value string) string
- func (handler *ArgumentHandler) Parse() map[string]string
- func (handler *ArgumentHandler) SetUtilizeDash(status bool)
- type Argument_t
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArgumentHandler ¶
type ArgumentHandler struct {
// contains filtered or unexported fields
}
func (*ArgumentHandler) Add ¶
func (handler *ArgumentHandler) Add(long_name string, short_name string, needs_value bool, required bool, desc string)
Basic way of adding an argument
func (*ArgumentHandler) AddFunction ¶
func (handler *ArgumentHandler) AddFunction(long_name string, short_name string, needs_value bool, required bool, desc string, foo func(string) string)
Adds an argument that will execute a function when entered Any value entered along side the argument will be passed to the function
func (*ArgumentHandler) AddFunctionOptions ¶
func (handler *ArgumentHandler) AddFunctionOptions(long_name string, short_name string, needs_value bool, required bool, desc string, foo func(string) string, options []string)
Adds an argument that will execute a function when entered Any value entered along side the argument will be passed to the function
func (*ArgumentHandler) AddOptions ¶
func (handler *ArgumentHandler) AddOptions(long_name string, short_name string, needs_value bool, required bool, desc string, options []string)
Adds an argument but with options
func (*ArgumentHandler) Help ¶
func (handler *ArgumentHandler) Help(ignore_value string) string
Prints a pretty help screen and exits
func (*ArgumentHandler) Parse ¶
func (handler *ArgumentHandler) Parse() map[string]string
Parses all entered values and returns a map containing the results
func (*ArgumentHandler) SetUtilizeDash ¶
func (handler *ArgumentHandler) SetUtilizeDash(status bool)
Enables/Disables the option to utilize '--'/'-' in your arguments
type Argument_t ¶
type Argument_t struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.