Documentation ¶
Index ¶
- func BoolVarPF(f *pflag.FlagSet, p *bool, name, shorthand string, value bool, usage string) *pflag.Flag
- func BytesBase64Var(f *pflag.FlagSet, name string, value []byte, usage string) *[]byte
- func BytesBase64VarP(f *pflag.FlagSet, p *[]byte, name, shorthand string, value []byte, ...)
- func BytesBase64VarPF(f *pflag.FlagSet, p *[]byte, name, shorthand string, value []byte, ...) *pflag.Flag
- func IntVarPF(f *pflag.FlagSet, p *int, name, shorthand string, value int, usage string) *pflag.Flag
- func LabelledStringVarP(flags *pflag.FlagSet, p *LabelledString, name, shorthand string, ...)
- func LabelledStringVarPF(flags *pflag.FlagSet, p *LabelledString, name, shorthand string, ...) *pflag.Flag
- func LabelledValueVarP(flags *pflag.FlagSet, p *LabelledValue, name, shorthand string, ...)
- func LabelledValueVarPF(flags *pflag.FlagSet, p *LabelledValue, name, shorthand string, ...) *pflag.Flag
- func NewLabelledStringValue(val LabelledString, p *LabelledString) *labelledStringValue
- func Semver(f *pflag.FlagSet, name string, value []*semver.Version, usage string) *[]*semver.Version
- func SemverConstraints(f *pflag.FlagSet, name string, value []*semver.Constraints, usage string) *[]*semver.Constraints
- func SemverConstraintsP(f *pflag.FlagSet, name, shorthand string, value []*semver.Constraints, ...) *[]*semver.Constraints
- func SemverConstraintsVar(f *pflag.FlagSet, p *[]*semver.Constraints, name string, ...)
- func SemverConstraintsVarP(f *pflag.FlagSet, p *[]*semver.Constraints, name, shorthand string, ...)
- func SemverConstraintsVarPF(f *pflag.FlagSet, p *[]*semver.Constraints, name, shorthand string, ...) *pflag.Flag
- func SemverP(f *pflag.FlagSet, name, shorthand string, value []*semver.Version, ...) *[]*semver.Version
- func SemverVar(f *pflag.FlagSet, p *[]*semver.Version, name string, value []*semver.Version, ...)
- func SemverVarP(f *pflag.FlagSet, p *[]*semver.Version, name, shorthand string, ...)
- func SemverVarPF(f *pflag.FlagSet, p *[]*semver.Version, name, shorthand string, ...) *pflag.Flag
- func StringArrayVarPF(f *pflag.FlagSet, p *[]string, name, shorthand string, value []string, ...) *pflag.Flag
- func StringToStringVar[T ~map[string]string](f *pflag.FlagSet, p *T, name string, value map[string]string, usage string)
- func StringToStringVarP[T ~map[string]string](f *pflag.FlagSet, p *T, name, shorthand string, value map[string]string, ...)
- func StringToStringVarPF[T ~map[string]string](f *pflag.FlagSet, p *T, name, shorthand string, value map[string]string, ...) *pflag.Flag
- func StringToStringVarPFA[T ~map[string]string](f *pflag.FlagSet, p *T, name, shorthand string, value map[string]string, ...) *pflag.Flag
- func StringToValue(f *pflag.FlagSet, name string, value map[string]interface{}, usage string) *map[string]interface{}
- func StringToValueP(f *pflag.FlagSet, name, shorthand string, value map[string]interface{}, ...) *map[string]interface{}
- func StringToValueVar(f *pflag.FlagSet, p *map[string]interface{}, name string, ...)
- func StringToValueVarP(f *pflag.FlagSet, p *map[string]interface{}, name, shorthand string, ...)
- func StringToValueVarPF(f *pflag.FlagSet, p *map[string]interface{}, name, shorthand string, ...) *pflag.Flag
- func StringVarPF(f *pflag.FlagSet, p *string, name, shorthand string, value string, ...) *pflag.Flag
- func YAMLVarP[T any](flags *pflag.FlagSet, p *T, name, shorthand string, value T, usage string)
- func YAMLVarPF[T any](flags *pflag.FlagSet, p *T, name, shorthand string, value T, usage string) *pflag.Flag
- type LabelledString
- type LabelledValue
- type LabelledValueValue
- type YAMLValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolVarPF ¶
func BoolVarPF(f *pflag.FlagSet, p *bool, name, shorthand string, value bool, usage string) *pflag.Flag
BoolVarPF is like BoolVarP, but returns the created flag.
func BytesBase64Var ¶
BytesBase64Var defines an []byte flag with specified name, default value, and usage string. The return value is the address of an []byte variable that stores the value of the flag.
func BytesBase64VarP ¶
func BytesBase64VarP(f *pflag.FlagSet, p *[]byte, name, shorthand string, value []byte, usage string)
BytesBase64VarP is like BytesBase64Var, but accepts a shorthand letter that can be used after a single dash.
func BytesBase64VarPF ¶
func IntVarPF ¶
func IntVarPF(f *pflag.FlagSet, p *int, name, shorthand string, value int, usage string) *pflag.Flag
IntVarPF is like IntVarP, but returns the created flag.
func LabelledStringVarP ¶
func LabelledStringVarP(flags *pflag.FlagSet, p *LabelledString, name, shorthand string, value LabelledString, usage string)
func LabelledStringVarPF ¶
func LabelledStringVarPF(flags *pflag.FlagSet, p *LabelledString, name, shorthand string, value LabelledString, usage string) *pflag.Flag
func LabelledValueVarP ¶
func LabelledValueVarP(flags *pflag.FlagSet, p *LabelledValue, name, shorthand string, value LabelledValue, usage string)
func LabelledValueVarPF ¶
func LabelledValueVarPF(flags *pflag.FlagSet, p *LabelledValue, name, shorthand string, value LabelledValue, usage string) *pflag.Flag
func NewLabelledStringValue ¶
func NewLabelledStringValue(val LabelledString, p *LabelledString) *labelledStringValue
func SemverConstraints ¶
func SemverConstraintsP ¶
func SemverConstraintsVar ¶
func SemverConstraintsVarP ¶
func SemverConstraintsVarPF ¶
func SemverVarP ¶
func SemverVarPF ¶
func StringArrayVarPF ¶
func StringArrayVarPF(f *pflag.FlagSet, p *[]string, name, shorthand string, value []string, usage string) *pflag.Flag
StringArrayVarPF is like StringArrayVarP, but returns the created flag.
func StringToStringVar ¶
func StringToStringVar[T ~map[string]string](f *pflag.FlagSet, p *T, name string, value map[string]string, usage string)
StringToStringVar defines a string flag with specified name, default value, and usage string. The argument p points to a map[string]string variable in which to store the values of the multiple flags. The value of each argument will not try to be separated by comma.
func StringToStringVarP ¶
func StringToStringVarP[T ~map[string]string](f *pflag.FlagSet, p *T, name, shorthand string, value map[string]string, usage string)
StringToStringVarP is like StringToStringVar, but accepts a shorthand letter that can be used after a single dash.
func StringToStringVarPF ¶
func StringToStringVarPF[T ~map[string]string](f *pflag.FlagSet, p *T, name, shorthand string, value map[string]string, usage string) *pflag.Flag
StringToStringVarPF is like StringToStringVarP, but returns the created flag.
func StringToStringVarPFA ¶
func StringToStringVarPFA[T ~map[string]string](f *pflag.FlagSet, p *T, name, shorthand string, value map[string]string, usage string) *pflag.Flag
StringToStringVarPFA is like StringToStringVarPF, but allows to add to a preset map.
func StringToValue ¶
func StringToValueP ¶
func StringToValueVar ¶
func StringToValueVarP ¶
func StringToValueVarPF ¶
func StringVarPF ¶
func StringVarPF(f *pflag.FlagSet, p *string, name, shorthand string, value string, usage string) *pflag.Flag
StringVarPF is like StringVarP, but returns the created flag.
Types ¶
type LabelledString ¶
type LabelledValue ¶
type LabelledValue struct { Name string Value interface{} }
type LabelledValueValue ¶
type LabelledValueValue LabelledValue
func NewLabelledValueValue ¶
func NewLabelledValueValue(val LabelledValue, p *LabelledValue) *LabelledValueValue
func (*LabelledValueValue) Set ¶
func (i *LabelledValueValue) Set(s string) error
func (*LabelledValueValue) String ¶
func (i *LabelledValueValue) String() string
func (*LabelledValueValue) Type ¶
func (i *LabelledValueValue) Type() string
type YAMLValue ¶
type YAMLValue[T any] struct { // contains filtered or unexported fields }