MCPcopy Create free account
hub / github.com/docker/cli / DurationOpt

Struct DurationOpt

opts/duration.go:29–31  ·  view source on GitHub ↗

DurationOpt is an option type for time.Duration that uses a pointer. This allows us to get nil values outside, instead of defaulting to 0

Source from the content-addressed store, hash-verified

27// DurationOpt is an option type for time.Duration that uses a pointer. This
28// allows us to get nil values outside, instead of defaulting to 0
29type DurationOpt struct {
30 value *time.Duration
31}
32
33// NewDurationOpt creates a DurationOpt with the specified duration
34func NewDurationOpt(value *time.Duration) *DurationOpt {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected