Merge pull request #84440 from lsytj0413/fix-gosimple

refactor(*): fix comparison to bool constant, return redundant
This commit is contained in:
Kubernetes Prow Robot
2019-11-01 18:08:10 -07:00
committed by GitHub
5 changed files with 6 additions and 10 deletions

View File

@@ -296,10 +296,7 @@ func TestDeleteEndpointConnections(t *testing.T) {
if tc.protocol == UDP {
isIPv6 := func(ip string) bool {
netIP := net.ParseIP(ip)
if netIP.To4() == nil {
return true
}
return false
return netIP.To4() == nil
}
endpointIP := utilproxy.IPPart(tc.endpoint)
expectCommand := fmt.Sprintf("conntrack -D --orig-dst %s --dst-nat %s -p udp", tc.svcIP, endpointIP)