MCPcopy
hub / github.com/spf13/pflag / DurationVarP

Method DurationVarP

duration.go:47–49  ·  view source on GitHub ↗

DurationVarP is like DurationVar, but accepts a shorthand letter that can be used after a single dash.

(p *time.Duration, name, shorthand string, value time.Duration, usage string)

Source from the content-addressed store, hash-verified

45
46// DurationVarP is like DurationVar, but accepts a shorthand letter that can be used after a single dash.
47func (f *FlagSet) DurationVarP(p *time.Duration, name, shorthand string, value time.Duration, usage string) {
48 f.VarP(newDurationValue(value, p), name, shorthand, usage)
49}
50
51// DurationVar defines a time.Duration flag with specified name, default value, and usage string.
52// The argument p points to a time.Duration variable in which to store the value of the flag.

Callers 2

DurationMethod · 0.95
DurationPMethod · 0.95

Calls 2

VarPMethod · 0.95
newDurationValueFunction · 0.85

Tested by

no test coverage detected