getAuthConfigKey special-cases using the full index address of the official index as the AuthConfig key, and uses the (host)name[:port] for private indexes. It is similar to [registry.GetAuthConfigKey], but does not require on [registrytypes.IndexInfo] as intermediate. [registry.GetAuthConfigKey]:
(domainName string)
| 63 | // [registry.GetAuthConfigKey]: https://pkg.go.dev/github.com/docker/docker@v28.3.3+incompatible/registry#GetAuthConfigKey |
| 64 | // [registrytypes.IndexInfo]: https://pkg.go.dev/github.com/docker/docker@v28.3.3+incompatible/api/types/registry#IndexInfo |
| 65 | func getAuthConfigKey(domainName string) string { |
| 66 | if domainName == "docker.io" || domainName == "index.docker.io" { |
| 67 | return authConfigKey |
| 68 | } |
| 69 | return domainName |
| 70 | } |
| 71 | |
| 72 | // newRegistryClient returns a client for communicating with a Docker distribution |
| 73 | // registry |
no outgoing calls
no test coverage detected
searching dependent graphs…