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

Function setUpIPSFlagSetWithDefault

ip_slice_test.go:16–25  ·  view source on GitHub ↗
(ipsp *[]net.IP)

Source from the content-addressed store, hash-verified

14}
15
16func setUpIPSFlagSetWithDefault(ipsp *[]net.IP) *FlagSet {
17 f := NewFlagSet("test", ContinueOnError)
18 f.IPSliceVar(ipsp, "ips",
19 []net.IP{
20 net.ParseIP("192.168.1.1"),
21 net.ParseIP("0:0:0:0:0:0:0:1"),
22 },
23 "Command separated list!")
24 return f
25}
26
27func TestEmptyIP(t *testing.T) {
28 var ips []net.IP

Callers 2

TestIPSDefaultFunction · 0.85
TestIPSWithDefaultFunction · 0.85

Calls 2

IPSliceVarMethod · 0.95
NewFlagSetFunction · 0.85

Tested by

no test coverage detected