Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OptionalDuration ¶
OptionalDuration is a config option that can be either set to a time.Duration, or a false value via the string "false" or an empty value.
Compared to the standard library duration, the parsing of this duration also supports more units:
- "d" for "24h" - "w" for "7d" - "M" for "30d" - "y" for "365d"
func NewOptionalDuration ¶
func NewOptionalDuration(dur time.Duration) OptionalDuration
func (*OptionalDuration) Set ¶
func (o *OptionalDuration) Set(v string) error
Set implements pflag.Value.
func (OptionalDuration) String ¶
func (o OptionalDuration) String() string
String implements pflag.Value.
func (*OptionalDuration) UnmarshalText ¶
func (o *OptionalDuration) UnmarshalText(text []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
Click to show internal directories.
Click to hide internal directories.