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

Function IPSliceVar

ip_slice.go:153–155  ·  view source on GitHub ↗

IPSliceVar defines a []net.IP 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

151// IPSliceVar defines a []net.IP flag with specified name, default value, and usage string.
152// The argument p points to a []net.IP variable in which to store the value of the flag.
153func IPSliceVar(p *[]net.IP, name string, value []net.IP, usage string) {
154 CommandLine.VarP(newIPSliceValue(value, p), name, "", usage)
155}
156
157// IPSliceVarP is like IPSliceVar, but accepts a shorthand letter that can be used after a single dash.
158func IPSliceVarP(p *[]net.IP, name, shorthand string, value []net.IP, usage string) {

Callers

nothing calls this directly

Calls 2

newIPSliceValueFunction · 0.85
VarPMethod · 0.80

Tested by

no test coverage detected