MCPcopy Index your code
hub / github.com/urfave/cli / Set

Method Set

flag_duration.go:27–34  ·  view source on GitHub ↗

Below functions are to satisfy the flag.Value interface

(s string)

Source from the content-addressed store, hash-verified

25// Below functions are to satisfy the flag.Value interface
26
27func (d *durationValue) Set(s string) error {
28 v, err := time.ParseDuration(s)
29 if err != nil {
30 return err
31 }
32 *d = durationValue(v)
33 return err
34}
35
36func (d *durationValue) Get() any { return time.Duration(*d) }
37

Callers

nothing calls this directly

Calls 1

durationValueTypeAlias · 0.85

Tested by

no test coverage detected