Help us shape the future of Go! Take the 2026 Go Developer Survey

command

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeHelp

func MakeHelp(c AutoHelp) string

MakeHelp generates a help string based on the capabilities of the Command

func OptionsHelpOutput

func OptionsHelpOutput(flags []*flag.Flag) string

OptionsHelpOutput returns a string of formatted options

Types

type AutoHelp

type AutoHelp interface {
	Usage() string
	Description() string
	InitOpts()
	VisitAllFlags(func(f *flag.Flag))
}

AutoHelp specifies the necessary methods required to have their help completely generated for them.

type ByName

type ByName []*flag.Flag

ByOptName implements sort.Interface for flag.Flag based on the Name field.

func (ByName) Len

func (a ByName) Len() int

func (ByName) Less

func (a ByName) Less(i, j int) bool

func (ByName) Swap

func (a ByName) Swap(i, j int)

type DumpCommand

type DumpCommand struct {
	Ui cli.Ui
	// contains filtered or unexported fields
}

func (*DumpCommand) Description

func (c *DumpCommand) Description() string

Description is the long-form command help.

func (*DumpCommand) Help

func (c *DumpCommand) Help() string

Help returns the full help output expected by `sockaddr -h cmd`

func (*DumpCommand) InitOpts

func (c *DumpCommand) InitOpts()

InitOpts is responsible for setup of this command's configuration via the command line. InitOpts() does not parse the arguments (see parseOpts()).

func (*DumpCommand) Run

func (c *DumpCommand) Run(args []string) int

Run executes this command.

func (*DumpCommand) Synopsis

func (c *DumpCommand) Synopsis() string

Synopsis returns a terse description used when listing sub-commands.

func (*DumpCommand) Usage

func (c *DumpCommand) Usage() string

Usage is the one-line usage description

func (*DumpCommand) VisitAllFlags

func (c *DumpCommand) VisitAllFlags(fn func(*flag.Flag))

VisitAllFlags forwards the visitor function to the FlagSet

type EvalCommand

type EvalCommand struct {
	Ui cli.Ui
	// contains filtered or unexported fields
}

func (*EvalCommand) Description

func (c *EvalCommand) Description() string

Description is the long-form command help.

func (*EvalCommand) Help

func (c *EvalCommand) Help() string

Help returns the full help output expected by `sockaddr -h cmd`

func (*EvalCommand) InitOpts

func (c *EvalCommand) InitOpts()

InitOpts is responsible for setup of this command's configuration via the command line. InitOpts() does not parse the arguments (see parseOpts()).

func (*EvalCommand) Run

func (c *EvalCommand) Run(args []string) int

Run executes this command.

func (*EvalCommand) Synopsis

func (c *EvalCommand) Synopsis() string

Synopsis returns a terse description used when listing sub-commands.

func (*EvalCommand) Usage

func (c *EvalCommand) Usage() string

Usage is the one-line usage description

func (*EvalCommand) VisitAllFlags

func (c *EvalCommand) VisitAllFlags(fn func(*flag.Flag))

VisitAllFlags forwards the visitor function to the FlagSet

type MultiArg

type MultiArg []string

func (*MultiArg) Set

func (v *MultiArg) Set(raw string) error

func (*MultiArg) String

func (v *MultiArg) String() string

type RFCCommand

type RFCCommand struct {
	Ui cli.Ui
	// contains filtered or unexported fields
}

func (*RFCCommand) Description

func (c *RFCCommand) Description() string

Description is the long-form command help.

func (*RFCCommand) Help

func (c *RFCCommand) Help() string

Help returns the full help output expected by `sockaddr -h cmd`

func (*RFCCommand) InitOpts

func (c *RFCCommand) InitOpts()

InitOpts is responsible for setup of this command's configuration via the command line. InitOpts() does not parse the arguments (see parseOpts()).

func (*RFCCommand) Run

func (c *RFCCommand) Run(args []string) int

Run executes this command.

func (*RFCCommand) Synopsis

func (c *RFCCommand) Synopsis() string

Synopsis returns a terse description used when listing sub-commands.

func (*RFCCommand) Usage

func (c *RFCCommand) Usage() string

Usage is the one-line usage description

func (*RFCCommand) VisitAllFlags

func (c *RFCCommand) VisitAllFlags(fn func(*flag.Flag))

VisitAllFlags forwards the visitor function to the FlagSet

type RFCListCommand

type RFCListCommand struct {
	Ui cli.Ui
	// contains filtered or unexported fields
}

func (*RFCListCommand) Description

func (c *RFCListCommand) Description() string

Description is the long-form command help.

func (*RFCListCommand) Help

func (c *RFCListCommand) Help() string

Help returns the full help output expected by `sockaddr -h cmd`

func (*RFCListCommand) InitOpts

func (c *RFCListCommand) InitOpts()

InitOpts is responsible for setup of this command's configuration via the command line. InitOpts() does not parse the arguments (see parseOpts()).

func (*RFCListCommand) Run

func (c *RFCListCommand) Run(args []string) int

Run executes this command.

func (*RFCListCommand) Synopsis

func (c *RFCListCommand) Synopsis() string

Synopsis returns a terse description used when listing sub-commands.

func (*RFCListCommand) Usage

func (c *RFCListCommand) Usage() string

Usage is the one-line usage description

func (*RFCListCommand) VisitAllFlags

func (c *RFCListCommand) VisitAllFlags(fn func(*flag.Flag))

VisitAllFlags forwards the visitor function to the FlagSet

type TechSupportCommand

type TechSupportCommand struct {
	Ui cli.Ui
	// contains filtered or unexported fields
}

func (*TechSupportCommand) Description

func (c *TechSupportCommand) Description() string

Description is the long-form command help.

func (*TechSupportCommand) Help

func (c *TechSupportCommand) Help() string

Help returns the full help output expected by `sockaddr -h cmd`

func (*TechSupportCommand) InitOpts

func (c *TechSupportCommand) InitOpts()

InitOpts is responsible for setup of this command's configuration via the command line. InitOpts() does not parse the arguments (see parseOpts()).

func (*TechSupportCommand) Run

func (c *TechSupportCommand) Run(args []string) int

Run executes this command.

func (*TechSupportCommand) Synopsis

func (c *TechSupportCommand) Synopsis() string

Synopsis returns a terse description used when listing sub-commands.

func (*TechSupportCommand) Usage

func (c *TechSupportCommand) Usage() string

Usage is the one-line usage description

func (*TechSupportCommand) VisitAllFlags

func (c *TechSupportCommand) VisitAllFlags(fn func(*flag.Flag))

VisitAllFlags forwards the visitor function to the FlagSet

type VersionCommand

type VersionCommand struct {
	HumanVersion string
	Ui           cli.Ui
}

VersionCommand is a Command implementation prints the version.

func (*VersionCommand) Help

func (c *VersionCommand) Help() string

func (*VersionCommand) Run

func (c *VersionCommand) Run(_ []string) int

func (*VersionCommand) Synopsis

func (c *VersionCommand) Synopsis() string

Jump to

Keyboard shortcuts

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