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

Struct flagValueWrapper

golangflag.go:27–30  ·  view source on GitHub ↗

flagValueWrapper implements pflag.Value around a flag.Value. The main difference here is the addition of the Type method that returns a string name of the type. As this is generally unknown, we approximate that with reflection.

Source from the content-addressed store, hash-verified

25// name of the type. As this is generally unknown, we approximate that with
26// reflection.
27type flagValueWrapper struct {
28 inner goflag.Value
29 flagType string
30}
31
32// We are just copying the boolFlag interface out of goflag as that is what
33// they use to decide if a flag should get "true" when no arg is given.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected