Skip to content

Commit ebbaee6

Browse files
committed
registryurl: remove fallback code for go < 1.8
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 8369960 commit ebbaee6

File tree

3 files changed

+10
-58
lines changed

3 files changed

+10
-58
lines changed

registryurl/parse.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,13 @@ func Parse(registryURL string) (*url.URL, error) {
3535
u.RawQuery = ""
3636
return u, nil
3737
}
38+
39+
// GetHostname returns the hostname of the URL
40+
func GetHostname(u *url.URL) string {
41+
return u.Hostname()
42+
}
43+
44+
// GetPort returns the port number of the URL
45+
func GetPort(u *url.URL) string {
46+
return u.Port()
47+
}

registryurl/url_go18.go

Lines changed: 0 additions & 17 deletions
This file was deleted.

registryurl/url_non_go18.go

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)