mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 05:46:16 +00:00
Fixes Issue 55816: Removes unneeded IPPart error
This commit is contained in:
parent
95b4312899
commit
8deec6a7db
@ -39,8 +39,9 @@ func IPPart(s string) string {
|
|||||||
}
|
}
|
||||||
// Check if host string is a valid IP address
|
// Check if host string is a valid IP address
|
||||||
if ip := net.ParseIP(host); ip != nil {
|
if ip := net.ParseIP(host); ip != nil {
|
||||||
|
return ip.String()
|
||||||
|
} else {
|
||||||
glog.Errorf("invalid IP part '%s'", host)
|
glog.Errorf("invalid IP part '%s'", host)
|
||||||
return host
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user