orden

package module
v0.0.0-...-c3251f6 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(root Command, args []string) error

func WriteHelp

func WriteHelp(w io.Writer, c Command) error

Types

type Command

type Command interface {
	Info() CommandInfo
}

type CommandInfo

type CommandInfo struct {
	Name string
	Help string
}

type FlagArgRunner

type FlagArgRunner interface {
	Run(fv *FlagValues, args []string) error
}

type FlagInfo

type FlagInfo struct {
	KeyOnly bool
	Many    bool
	Short   rune
	Long    string
	Help    string
	Default string
}

type FlagRunner

type FlagRunner interface {
	Run(fv *FlagValues) error
}

type FlagValues

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

func (*FlagValues) Get

func (fv *FlagValues) Get(key string) string

func (*FlagValues) GetAll

func (fv *FlagValues) GetAll(key string) []string

func (*FlagValues) Has

func (fv *FlagValues) Has(key string) bool

type Flagger

type Flagger interface {
	Flags() []FlagInfo
}

type Subcommander

type Subcommander interface {
	Subcommands() []Command
}

Jump to

Keyboard shortcuts

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