mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 16:06:51 +00:00
func parseEndpointWithFallbackProtocol should check if protocol of endpoint is empty.
This commit is contained in:
@@ -39,7 +39,9 @@ func parseEndpoint(endpoint string) (string, string, error) {
|
||||
return "tcp", u.Host, nil
|
||||
} else if u.Scheme == "unix" {
|
||||
return "unix", u.Path, nil
|
||||
} else if u.Scheme == "" {
|
||||
return "", "", fmt.Errorf("Using %q as endpoint is deprecated, please consider using full url format", endpoint)
|
||||
} else {
|
||||
return "", "", fmt.Errorf("protocol %q not supported", u.Scheme)
|
||||
return u.Scheme, "", fmt.Errorf("protocol %q not supported", u.Scheme)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user