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

Method IPSliceVar

ip_slice.go:142–144  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

140// IPSliceVar defines a ipSlice flag with specified name, default value, and usage string.
141// The argument p points to a []net.IP variable in which to store the value of the flag.
142func (f *FlagSet) IPSliceVar(p *[]net.IP, name string, value []net.IP, usage string) {
143 f.VarP(newIPSliceValue(value, p), name, "", usage)
144}
145
146// IPSliceVarP is like IPSliceVar, but accepts a shorthand letter that can be used after a single dash.
147func (f *FlagSet) IPSliceVarP(p *[]net.IP, name, shorthand string, value []net.IP, usage string) {

Callers 2

setUpIPSFlagSetFunction · 0.95

Calls 2

VarPMethod · 0.95
newIPSliceValueFunction · 0.85

Tested by 2

setUpIPSFlagSetFunction · 0.76