mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Fix some lint errors in pkg/proxy
This commit is contained in:
@@ -39,12 +39,12 @@ func IPPart(s string) string {
|
||||
return ""
|
||||
}
|
||||
// Check if host string is a valid IP address
|
||||
if ip := net.ParseIP(host); ip != nil {
|
||||
return ip.String()
|
||||
} else {
|
||||
ip := net.ParseIP(host)
|
||||
if ip == nil {
|
||||
klog.Errorf("invalid IP part '%s'", host)
|
||||
return ""
|
||||
}
|
||||
return ""
|
||||
return ip.String()
|
||||
}
|
||||
|
||||
// PortPart returns just the port part of an endpoint string.
|
||||
|
||||
Reference in New Issue
Block a user