diff --git a/pkg/util/iptables/monitor_test.go b/pkg/util/iptables/monitor_test.go index 7f4d4176dc8..37e9ddcd3ad 100644 --- a/pkg/util/iptables/monitor_test.go +++ b/pkg/util/iptables/monitor_test.go @@ -130,9 +130,8 @@ func (mfc *monitorFakeCmd) CombinedOutput() ([]byte, error) { case opListChain: if table.Has(chainName) { return []byte{}, nil - } else { - return []byte{}, fmt.Errorf("no such chain %q", chainName) } + return []byte{}, fmt.Errorf("no such chain %q", chainName) case opDeleteChain: table.Delete(chainName) return []byte{}, nil