Documentation
¶
Index ¶
- Constants
- Variables
- func Combine(flags ...interface{}) []cli.Flag
- func GetColor(c *cli.Context) (color string, err error)
- func ToUpper(c *cli.Context, flags ...*cli.StringFlag)
- type BoolWithInverse
- type BoolWithInverseFlag
- func (s *BoolWithInverseFlag) Apply(set *flag.FlagSet) error
- func (s *BoolWithInverseFlag) Flags() []cli.Flag
- func (s *BoolWithInverseFlag) IsSet() bool
- func (s *BoolWithInverseFlag) Names() []string
- func (s *BoolWithInverseFlag) RunAction(ctx *cli.Context) error
- func (s *BoolWithInverseFlag) String() string
- func (s *BoolWithInverseFlag) Value() bool
Constants ¶
View Source
const ColorNever = "never"
Variables ¶
View Source
var Color = &cli.StringFlag{ Name: "color", DefaultText: "auto", EnvVars: []string{"TAU_COLOR"}, }
View Source
var ColorOptions = []string{"never", "auto"}
View Source
var (
DefaultInverseBoolPrefix = "no-"
)
Functions ¶
Types ¶
type BoolWithInverse ¶
type BoolWithInverseFlag ¶
type BoolWithInverseFlag struct { // The BoolFlag which the positive and negative flags are generated from *cli.BoolFlag // The prefix used to indicate a negative value // Default: `env` becomes `no-env` InversePrefix string // contains filtered or unexported fields }
func (*BoolWithInverseFlag) Flags ¶
func (s *BoolWithInverseFlag) Flags() []cli.Flag
func (*BoolWithInverseFlag) IsSet ¶
func (s *BoolWithInverseFlag) IsSet() bool
func (*BoolWithInverseFlag) Names ¶
func (s *BoolWithInverseFlag) Names() []string
func (*BoolWithInverseFlag) RunAction ¶
func (s *BoolWithInverseFlag) RunAction(ctx *cli.Context) error
func (*BoolWithInverseFlag) String ¶
func (s *BoolWithInverseFlag) String() string
Example for BoolFlag{Name: "env"} --env | --no-env Usage...
func (*BoolWithInverseFlag) Value ¶
func (s *BoolWithInverseFlag) Value() bool
Click to show internal directories.
Click to hide internal directories.