File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,9 +99,14 @@ func (c *fileStore) Store(authConfig types.AuthConfig) error {
9999 return nil
100100}
101101
102- // ConvertToHostname converts a registry url which has http|https prepended
103- // to just an hostname.
104- // Copied from github.com/docker/docker/registry.ConvertToHostname to reduce dependencies.
102+ // ConvertToHostname normalizes a registry URL which has http|https prepended
103+ // to just its hostname. It is used to match credentials, which may be either
104+ // stored as hostname or as hostname including scheme (in legacy configuration
105+ // files).
106+ //
107+ // It's the equivalent to [registry.ConvertToHostname] in the daemon.
108+ //
109+ // [registry.ConvertToHostname]: https://pkg.go.dev/github.com/moby/moby/v2@v2.0.0-beta.7/daemon/pkg/registry#ConvertToHostname
105110func ConvertToHostname (maybeURL string ) string {
106111 stripped := maybeURL
107112 if strings .Contains (stripped , "://" ) {
You can’t perform that action at this time.
0 commit comments