Documentation
¶
Index ¶
- 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 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 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 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 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 ¶
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 }
func NewYAMLValue ¶
Click to show internal directories.
Click to hide internal directories.