helm

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HelloMainFunc

func HelloMainFunc(h *Helm) error

func HelloSubCommands added in v1.0.6

func HelloSubCommands() map[string]Route

func StartExample

func StartExample()

Types

type Command

type Command struct {
	// contains filtered or unexported fields
}

func ZeroCommand

func ZeroCommand() Command

func (Command) Arg

func (c Command) Arg(argName string) []string

func (Command) Args added in v1.0.4

func (c Command) Args() map[string]arg

func (Command) Flag

func (c Command) Flag(flag byte) bool

func (Command) Flags added in v1.0.4

func (c Command) Flags() map[byte]struct{}

func (Command) Name

func (c Command) Name() string

type CommandFunc

type CommandFunc func(helm *Helm) error

CommandFunc

type ErrMissingArg

type ErrMissingArg struct {
	ArgName string
}

func (ErrMissingArg) Error

func (e ErrMissingArg) Error() string

type Helm

type Helm struct {
	// contains filtered or unexported fields
}

func NewHelm

func NewHelm(in io.Reader, out io.Writer) *Helm

func NewHelmUI added in v1.0.3

func NewHelmUI() (*Helm, *ui.UI)

func (*Helm) CurrentCommand added in v1.0.4

func (h *Helm) CurrentCommand() Command

func (*Helm) OutputError

func (h *Helm) OutputError(e error)

func (*Helm) OutputString

func (h *Helm) OutputString(o string)

func (*Helm) Quit added in v1.0.5

func (h *Helm) Quit()

func (*Helm) RegisterRoute added in v1.0.6

func (h *Helm) RegisterRoute(name string, route Route) error

func (*Helm) Start

func (h *Helm) Start()

type Route

type Route struct {
	MainCommand CommandFunc
	SubCommands map[string]Route
}

Route represents a Command and its related sub commands

type SubCommands added in v1.0.6

type SubCommands map[string]Route

Jump to

Keyboard shortcuts

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