command

package
v0.1.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDebug

func AddDebug(cmd *cobra.Command, config *DebugConfig) *cobra.Command

func Command

func Command(obj Runnable, cmd cobra.Command) *cobra.Command

func Main

func Main(cmd *cobra.Command)

func Name

func Name(obj interface{}) string

Types

type DebugConfig

type DebugConfig struct {
	Debug      bool
	DebugLevel int
}

func (*DebugConfig) MustSetupDebug

func (c *DebugConfig) MustSetupDebug()

func (*DebugConfig) SetupDebug

func (c *DebugConfig) SetupDebug() error

type PersistentPreRunnable

type PersistentPreRunnable interface {
	PersistentPre(cmd *cobra.Command, args []string) error
}

type PreRunnable

type PreRunnable interface {
	Pre(cmd *cobra.Command, args []string) error
}

type Runnable

type Runnable interface {
	Run(cmd *cobra.Command, args []string) error
}

Jump to

Keyboard shortcuts

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