args

package
v0.0.0-...-8d9c0eb Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(app App)

func ExpectArgs

func ExpectArgs(fs *flag.FlagSet, args ...*string) error

func HandleError

func HandleError(err error) subcommands.ExitStatus

func WrapSimpleCommand

func WrapSimpleCommand(app App, simple SimpleCommand) subcommands.Command

Types

type App

type App interface {
	PreexecHook(cmd subcommands.Command, fs *flag.FlagSet)
	SetGlobalFlags(fs *flag.FlagSet)
}

type ArrayTransformValue

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

func (ArrayTransformValue) Apply

func (value ArrayTransformValue) Apply(target *[]string)

func (*ArrayTransformValue) Set

func (value *ArrayTransformValue) Set(arg string) error

func (ArrayTransformValue) String

func (value ArrayTransformValue) String() string

type SimpleCommand

type SimpleCommand interface {
	Name() string
	Synopsis() string
	Usage() string
	SetFlags(fs *flag.FlagSet)
	ParsePositional(fs *flag.FlagSet) error
	Execute(app App, fs *flag.FlagSet) subcommands.ExitStatus
}

A wrapper over subcommands.Command with a slightly simplified API.

Jump to

Keyboard shortcuts

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