cobra

package
v1.8.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(cmd *cobra.Command, args []string) wCli.Input

Parse is only for converting urfave *cli.Context to Input and will be removed in future.

func SetFlags

func SetFlags(cmd *cobra.Command, flagSet flag.FlagSet)

func Wrapper

func Wrapper(action cmd.CommandAction) func(*cobra.Command, []string) error

func WrapperChain

func WrapperChain(actions ...cmd.CommandAction) func(*cobra.Command, []string) error

Types

type Cli

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

func (Cli) Bool

func (u Cli) Bool(key string) bool

func (Cli) Duration

func (u Cli) Duration(key string) time.Duration

func (Cli) GlobalBool

func (u Cli) GlobalBool(key string) bool

func (Cli) GlobalInt

func (u Cli) GlobalInt(key string) int

func (Cli) GlobalInt64

func (u Cli) GlobalInt64(key string) int64

func (Cli) GlobalInt64Slice

func (u Cli) GlobalInt64Slice(key string) []int64

func (Cli) GlobalIntSlice

func (u Cli) GlobalIntSlice(key string) []int

func (Cli) GlobalString

func (u Cli) GlobalString(key string) string

func (Cli) GlobalStringSlice

func (u Cli) GlobalStringSlice(key string) []string

func (Cli) Int

func (u Cli) Int(key string) int

func (Cli) Int64

func (u Cli) Int64(key string) int64

func (Cli) Int64Slice

func (u Cli) Int64Slice(key string) []int64

func (Cli) IntSlice

func (u Cli) IntSlice(key string) []int

func (Cli) IsSet

func (u Cli) IsSet(key string) bool

func (Cli) String

func (u Cli) String(key string) string

func (Cli) StringSlice

func (u Cli) StringSlice(key string) []string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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