cobra

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2023 License: MIT Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMapper

func GetMapper(set *pflag.FlagSet) flags.Mapper

Types

type CobraMapper

type CobraMapper struct {
	flags.MapperFunc
	// contains filtered or unexported fields
}

func NewMapper

func NewMapper(set *pflag.FlagSet) *CobraMapper

func (*CobraMapper) BoolP

func (m *CobraMapper) BoolP(name, shorthand string, usage string, args ...interface{}) *CobraMapper

func (*CobraMapper) BoolVarP

func (m *CobraMapper) BoolVarP(out *bool, name, shorthand string, usage string, args ...interface{}) *CobraMapper

func (*CobraMapper) DurationP

func (m *CobraMapper) DurationP(name, shorthand string, usage string, args ...interface{}) *CobraMapper

func (*CobraMapper) DurationVarP

func (m *CobraMapper) DurationVarP(out *time.Duration, name, shorthand string, usage string, args ...interface{}) *CobraMapper

func (*CobraMapper) Int16P

func (m *CobraMapper) Int16P(name, shorthand string, usage string, args ...interface{}) *CobraMapper

func (*CobraMapper) Int16VarP

func (m *CobraMapper) Int16VarP(out *int16, name, shorthand string, usage string, args ...interface{}) *CobraMapper

func (*CobraMapper) Int32P

func (m *CobraMapper) Int32P(name, shorthand string, usage string, args ...interface{}) *CobraMapper

func (*CobraMapper) Int32VarP

func (m *CobraMapper) Int32VarP(out *int32, name, shorthand string, usage string, args ...interface{}) *CobraMapper

func (*CobraMapper) IntP added in v0.10.2

func (m *CobraMapper) IntP(name, shorthand string, usage string, args ...interface{}) *CobraMapper

func (*CobraMapper) IntVarP added in v0.10.2

func (m *CobraMapper) IntVarP(out *int, name, shorthand string, usage string, args ...interface{}) *CobraMapper

func (*CobraMapper) Lookup

func (m *CobraMapper) Lookup(name string) flags.Flag

func (*CobraMapper) Parse

func (m *CobraMapper) Parse()

Parse() updates all fields which mapped flags were used

func (*CobraMapper) StringP

func (m *CobraMapper) StringP(name, shorthand string, usage string, args ...interface{}) *CobraMapper

func (*CobraMapper) StringSliceP added in v0.10.3

func (m *CobraMapper) StringSliceP(name, shorthand string, usage string, args ...interface{}) *CobraMapper

func (*CobraMapper) StringSliceVarP added in v0.10.3

func (m *CobraMapper) StringSliceVarP(out *[]string, name, shorthand string, usage string, args ...interface{}) *CobraMapper

func (*CobraMapper) StringVarP

func (m *CobraMapper) StringVarP(out *string, name, shorthand string, usage string, args ...interface{}) *CobraMapper

func (*CobraMapper) Uint16P

func (m *CobraMapper) Uint16P(name, shorthand string, usage string, args ...interface{}) *CobraMapper

func (*CobraMapper) Uint16VarP

func (m *CobraMapper) Uint16VarP(out *uint16, name, shorthand string, usage string, args ...interface{}) *CobraMapper

func (*CobraMapper) Uint32P

func (m *CobraMapper) Uint32P(name, shorthand string, usage string, args ...interface{}) *CobraMapper

func (*CobraMapper) Uint32VarP

func (m *CobraMapper) Uint32VarP(out *uint32, name, shorthand string, usage string, args ...interface{}) *CobraMapper

func (*CobraMapper) UintP added in v0.10.2

func (m *CobraMapper) UintP(name, shorthand string, usage string, args ...interface{}) *CobraMapper

func (*CobraMapper) UintVarP added in v0.10.2

func (m *CobraMapper) UintVarP(out *uint, name, shorthand string, usage string, args ...interface{}) *CobraMapper

func (*CobraMapper) Var

func (m *CobraMapper) Var(ptr interface{}, name string, usage string, args ...interface{}) flags.Mapper

func (*CobraMapper) VarP

func (m *CobraMapper) VarP(ptr interface{}, name string, short rune, usage string, args ...interface{}) flags.Mapper

VarP identifies the type of field and calls the right mapper accordingly

type Command

type Command = cobra.Command

Jump to

Keyboard shortcuts

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