Documentation ¶
Overview ¶
Package cliflag extends flagset with environment variable defaults.
Usage:
cliflag.String(root.Flags(), &address, "address", "a", "CODER_ADDRESS", "127.0.0.1:3000", "The address to serve the API and dashboard")
Will produce the following usage docs:
-a, --address string The address to serve the API and dashboard (uses $CODER_ADDRESS). (default "127.0.0.1:3000")
Index ¶
- func BoolVarP(flagset *pflag.FlagSet, ptr *bool, name string, shorthand string, env string, ...)
- func String(flagset *pflag.FlagSet, name, shorthand, env, def, usage string)
- func StringArrayVarP(flagset *pflag.FlagSet, ptr *[]string, name string, shorthand string, ...)
- func StringVarP(flagset *pflag.FlagSet, p *string, name string, shorthand string, env string, ...)
- func Uint8VarP(flagset *pflag.FlagSet, ptr *uint8, name string, shorthand string, env string, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolVarP ¶
func BoolVarP(flagset *pflag.FlagSet, ptr *bool, name string, shorthand string, env string, def bool, usage string)
BoolVarP sets a bool flag on the given flag set.
func StringArrayVarP ¶ added in v0.4.4
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.