Documentation ¶
Index ¶
Constants ¶
View Source
const DurationHelp = "A duration string is a sequence of <number><unit> such as 2h15m. " +
"Supported units are 'ns', 'us'/'µs', 'ms', 's', 'm', and 'h'."
DurationHelp is generic Duration help.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Duration ¶
Duration is a Flag- and JSON-compatible Duration value.
func ParseDuration ¶
ParseDuration parses a clockflag Duration from a string. This is basically a typed fall-through to time.ParseDuration.
func (Duration) IsZero ¶
IsZero tests if this Duration is the zero value.
func (Duration) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
Marshals a Duration into a duration string.
Click to show internal directories.
Click to hide internal directories.