args

package
v0.0.0-...-66ed99e Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 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 ArgParser

type ArgParser struct {
	MaxLineLength   uint
	CommandRequired bool
	CommandsHelpMsg string
	FlagsHelpMsg    string
	OptionsHelpMsg  string
	// contains filtered or unexported fields
}

func (*ArgParser) AddCommand

func (ap *ArgParser) AddCommand(name string, help string) error

func (*ArgParser) AddFlag

func (ap *ArgParser) AddFlag(name string, help string, abbr rune) error

func (*ArgParser) AddOption

func (ap *ArgParser) AddOption(
	name string, help string, abbr rune, defaultsTo string, allowed []string,
) error

func (*ArgParser) Help

func (ap *ArgParser) Help()

func (*ArgParser) Init

func (ap *ArgParser) Init(name string, description string)

func (*ArgParser) Parse

func (ap *ArgParser) Parse() (*ArgResults, error)

type ArgResults

type ArgResults struct {
	Flag       map[string]bool
	Option     map[string]string
	Positional []string
	Command    string
}

Jump to

Keyboard shortcuts

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