Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOptionalIntValue ¶
func NewOptionalIntValue(p *OptionalInt) pflag.Value
NewOptionalIntValue returns the pflag.Value of the int.
func NewOptionalStringValue ¶
func NewOptionalStringValue(p *OptionalString) pflag.Value
NewOptionalStringValue returns a pflag.Value for the string.
func OptionalBoolFlag ¶
OptionalBoolFlag creates new flag for an optional in the specified flag with the specified name and usage.
Types ¶
type OptionalBool ¶
type OptionalBool struct {
// contains filtered or unexported fields
}
OptionalBool is a boolean with a separate presence flag and value.
func (*OptionalBool) Present ¶
func (ob *OptionalBool) Present() bool
Present returns the bool's presence flag.
func (*OptionalBool) Value ¶
func (ob *OptionalBool) Value() bool
Present returns the bool's value. Should only be used if Present() is true.
type OptionalInt ¶
type OptionalInt struct {
// contains filtered or unexported fields
}
OptionalInt is a int with a separate presence flag.
func (*OptionalInt) Present ¶
func (oi *OptionalInt) Present() bool
Present returns the int's presence flag.
func (*OptionalInt) Value ¶
func (oi *OptionalInt) Value() int
Present returns the int's value. Should only be used if Present() is true.
type OptionalString ¶
type OptionalString struct {
// contains filtered or unexported fields
}
OptionalString is a string with a separate presence flag.
func (*OptionalString) Present ¶
func (os *OptionalString) Present() bool
Present returns the strings's presence flag.
func (*OptionalString) Value ¶
func (os *OptionalString) Value() string
Present returns the string's value. Should only be used if Present() is true.