lib

package
v0.0.0-...-b2132b1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL