format code with gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@ -216,7 +216,8 @@ func TestUpdateSwarmSpecCertAndKey(t *testing.T) {
|
||||
"--detach",
|
||||
"--ca-cert=" + certfile,
|
||||
"--ca-key=" + keyfile,
|
||||
"--cert-expiry=3m"})
|
||||
"--cert-expiry=3m",
|
||||
})
|
||||
cmd.SetOut(cli.OutBuffer())
|
||||
assert.NilError(t, cmd.Execute())
|
||||
|
||||
@ -242,7 +243,8 @@ func TestUpdateSwarmSpecCertAndExternalCA(t *testing.T) {
|
||||
"--rotate",
|
||||
"--detach",
|
||||
"--ca-cert=" + certfile,
|
||||
"--external-ca=protocol=cfssl,url=https://some.external.ca.example.com"})
|
||||
"--external-ca=protocol=cfssl,url=https://some.external.ca.example.com",
|
||||
})
|
||||
cmd.SetOut(cli.OutBuffer())
|
||||
assert.NilError(t, cmd.Execute())
|
||||
|
||||
@ -280,7 +282,8 @@ func TestUpdateSwarmSpecCertAndKeyAndExternalCA(t *testing.T) {
|
||||
"--detach",
|
||||
"--ca-cert=" + certfile,
|
||||
"--ca-key=" + keyfile,
|
||||
"--external-ca=protocol=cfssl,url=https://some.external.ca.example.com"})
|
||||
"--external-ca=protocol=cfssl,url=https://some.external.ca.example.com",
|
||||
})
|
||||
cmd.SetOut(cli.OutBuffer())
|
||||
assert.NilError(t, cmd.Execute())
|
||||
|
||||
|
||||
@ -25,7 +25,6 @@ func newIPNetSliceValue(val []net.IPNet, p *[]net.IPNet) *ipNetSliceValue {
|
||||
// Set converts, and assigns, the comma-separated IPNet argument string representation as the []net.IPNet value of this flag.
|
||||
// If Set is called on a flag that already has a []net.IPNet assigned, the newly converted values will be appended.
|
||||
func (s *ipNetSliceValue) Set(val string) error {
|
||||
|
||||
// remove all quote characters
|
||||
rmQuote := strings.NewReplacer(`"`, "", `'`, "", "`", "")
|
||||
|
||||
@ -63,7 +62,6 @@ func (s *ipNetSliceValue) Type() string {
|
||||
|
||||
// String defines a "native" format for this net.IPNet slice flag value.
|
||||
func (s *ipNetSliceValue) String() string {
|
||||
|
||||
ipNetStrSlice := make([]string, len(*s.value))
|
||||
for i, n := range *s.value {
|
||||
ipNetStrSlice[i] = n.String()
|
||||
|
||||
@ -69,7 +69,6 @@ func TestIPNetCalledTwice(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestIPNetBadQuoting(t *testing.T) {
|
||||
|
||||
tests := []struct {
|
||||
Want []net.IPNet
|
||||
FlagArg []string
|
||||
@ -126,7 +125,8 @@ func TestIPNetBadQuoting(t *testing.T) {
|
||||
},
|
||||
FlagArg: []string{
|
||||
`"2e5e:66b2:6441:848:5b74:76ea:574c:3a7b/128, 2e5e:66b2:6441:848:5b74:76ea:574c:3a7b/128,2e5e:66b2:6441:848:5b74:76ea:574c:3a7b/128 "`,
|
||||
" 2e5e:66b2:6441:848:5b74:76ea:574c:3a7b/128"},
|
||||
" 2e5e:66b2:6441:848:5b74:76ea:574c:3a7b/128",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user