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

Method IPNet

ipnet.go:76–80  ·  view source on GitHub ↗

IPNet defines an net.IPNet flag with specified name, default value, and usage string. The return value is the address of an net.IPNet variable that stores the value of the flag.

(name string, value net.IPNet, usage string)

Source from the content-addressed store, hash-verified

74// IPNet defines an net.IPNet flag with specified name, default value, and usage string.
75// The return value is the address of an net.IPNet variable that stores the value of the flag.
76func (f *FlagSet) IPNet(name string, value net.IPNet, usage string) *net.IPNet {
77 p := new(net.IPNet)
78 f.IPNetVarP(p, name, "", value, usage)
79 return p
80}
81
82// IPNetP is like IPNet, but accepts a shorthand letter that can be used after a single dash.
83func (f *FlagSet) IPNetP(name, shorthand string, value net.IPNet, usage string) *net.IPNet {

Callers 2

TestPrintDefaultsFunction · 0.95
StringMethod · 0.80

Calls 1

IPNetVarPMethod · 0.95

Tested by 1

TestPrintDefaultsFunction · 0.76