1
0
mirror of https://github.com/docker/docker-credential-helpers.git synced 2026-06-13 16:01:28 +05:30

registryurl: remove fallback code for go < 1.8

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2022-08-20 20:18:03 +02:00
parent 8369960895
commit ebbaee6ed4
3 changed files with 10 additions and 58 deletions
+10
View File
@@ -35,3 +35,13 @@ func Parse(registryURL string) (*url.URL, error) {
u.RawQuery = ""
return u, nil
}
// GetHostname returns the hostname of the URL
func GetHostname(u *url.URL) string {
return u.Hostname()
}
// GetPort returns the port number of the URL
func GetPort(u *url.URL) string {
return u.Port()
}