package registryurl
import "github.com/docker/docker-credential-helpers/registryurl"
Index ¶
- func GetHostname(u *url.URL) string
- func GetPort(u *url.URL) string
- func Parse(registryURL string) (*url.URL, error)
Functions ¶
func GetHostname ¶
GetHostname returns the hostname of the URL
Deprecated: use url.Hostname()
func GetPort ¶
GetPort returns the port number of the URL
Deprecated: use url.Port()
func Parse ¶
Parse parses and validates a given serverURL to an url.URL, and returns an error if validation failed. Querystring parameters are omitted in the resulting URL, because they are not used in the helper.
If serverURL does not have a valid scheme, `//` is used as scheme before parsing. This prevents the hostname being used as path, and the credentials being stored without host.
Source Files ¶
- Version
- v0.9.3 (latest)
- Published
- Mar 14, 2025
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 2 days ago –
Tools for package owners.