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

Method IPNetSliceVar

ipnet_slice.go:103–105  ·  view source on GitHub ↗

IPNetSliceVar defines a ipNetSlice flag with specified name, default value, and usage string. The argument p points to a []net.IPNet variable in which to store the value of the flag.

(p *[]net.IPNet, name string, value []net.IPNet, usage string)

Source from the content-addressed store, hash-verified

101// IPNetSliceVar defines a ipNetSlice flag with specified name, default value, and usage string.
102// The argument p points to a []net.IPNet variable in which to store the value of the flag.
103func (f *FlagSet) IPNetSliceVar(p *[]net.IPNet, name string, value []net.IPNet, usage string) {
104 f.VarP(newIPNetSliceValue(value, p), name, "", usage)
105}
106
107// IPNetSliceVarP is like IPNetSliceVar, but accepts a shorthand letter that can be used after a single dash.
108func (f *FlagSet) IPNetSliceVarP(p *[]net.IPNet, name, shorthand string, value []net.IPNet, usage string) {

Callers 2

setUpIPNetFlagSetFunction · 0.95

Calls 2

VarPMethod · 0.95
newIPNetSliceValueFunction · 0.85

Tested by 2

setUpIPNetFlagSetFunction · 0.76