opts

package
v0.1.32 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: Unlicense Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoOp = func(c interface{}) error { return nil }

Functions

This section is empty.

Types

type Command added in v0.1.31

type Command struct {
	Name          string
	Description   string
	Documentation string
	Entrypoint    Op

	Commands Commands
	Opts     map[string]config.Option
	sync.Mutex
	// contains filtered or unexported fields
}

Command is a specification for a command and can include any number of subcommands, and for each Command a list of options

func New added in v0.1.31

func New(c *Command) *Command

func (*Command) Foreach added in v0.1.32

func (c *Command) Foreach(cl func(*Command, int) bool)

Foreach runs a closure on every node in the Commands tree, stopping if the closure returns false

func (*Command) MarshalText added in v0.1.32

func (c *Command) MarshalText() (text []byte, err error)

type Commands added in v0.1.31

type Commands []*Command

Commands are a slice of Command entries

type Op added in v0.1.32

type Op func(c interface{}) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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