cli

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommand

func AddCommand(rootCmd *cobra.Command, cmd *cobra.Command)

Types

type Cli

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

func NewCli

func NewCli(use, version, welcome string) *Cli

func (*Cli) AddCommand

func (c *Cli) AddCommand(cmd *cobra.Command)

func (*Cli) AddCommands

func (c *Cli) AddCommands(cmds []CommandFunc)

func (*Cli) Execute

func (c *Cli) Execute()

func (*Cli) Get

func (c *Cli) Get(key string) interface{}

func (*Cli) GetBool

func (c *Cli) GetBool(key string) bool

func (*Cli) GetInt

func (c *Cli) GetInt(key string) int

func (*Cli) GetInt64

func (c *Cli) GetInt64(key string) int64

func (*Cli) GetString

func (c *Cli) GetString(key string) string

func (*Cli) GetViper

func (c *Cli) GetViper() *viper.Viper

func (*Cli) Init

func (c *Cli) Init(flagSetFunc func(viper *viper.Viper, flags *pflag.FlagSet), readConfigFunc func(viper *viper.Viper)) error

func (*Cli) RootCmd

func (c *Cli) RootCmd() *cobra.Command

func (*Cli) RunE

func (c *Cli) RunE(runE func(cmd *cobra.Command, args []string) error)

type CommandFunc

type CommandFunc func(c *Cli) *cobra.Command

Jump to

Keyboard shortcuts

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