command

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppCommand

type AppCommand struct {
	Command *cobra.Command
}

AppCommand defines a stevedore command element

func NewCommand

func NewCommand(cmd *cobra.Command) *AppCommand

func (*AppCommand) AddCommands

func (c *AppCommand) AddCommands(cmds ...*AppCommand)

AddCommand method add a new subcommand to stevedore command

func (*AppCommand) Execute

func (c *AppCommand) Execute() error

Execute executes cobra command

func (*AppCommand) Options

func (c *AppCommand) Options(opts ...CommandOptionsFunc)

type CobraRunEFunc

type CobraRunEFunc func(cmd *cobra.Command, args []string) error

CobraRunEFunc is a cobra handler function which returns an error

type CobraRunFunc

type CobraRunFunc func(cmd *cobra.Command, args []string)

CobraRunFunc is a cobra handler function

type CommandOptionsFunc

type CommandOptionsFunc func(c *AppCommand)

func WithRun

Jump to

Keyboard shortcuts

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