command

package
v0.11.5 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FullCommand

func FullCommand(cmd *cobra.Command) string

Types

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 *StevedoreCommand)

func WithRun

WithRun is a command options function to setup the cobra Run option

func WithRunE

WithRunE is a command options function to setup the cobra RunE option

type StevedoreCommand

type StevedoreCommand struct {
	Command *cobra.Command
}

StevedoreCommand defines a stevedore command element

func (*StevedoreCommand) AddCommand

func (c *StevedoreCommand) AddCommand(cmd *StevedoreCommand)

AddCommand method add a new subcommand to stevedore command

func (*StevedoreCommand) Execute

func (c *StevedoreCommand) Execute() error

Execute executes cobra command

func (*StevedoreCommand) Options

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

Options configure the stevedore command

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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