Skip to content

Commit

Permalink
cli/command: fix documentation for ResolveAuthConfig
Browse files Browse the repository at this point in the history
This function no longer uses the /info endpoint to resolve the registry
to use. The documentation for this function was still referring to
the (once used) special registry for Windows images, which is no longer
in use, so update the docs to reflect reality :)

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit 5bd3591)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
thaJeztah committed Apr 12, 2023
1 parent 8b783cc commit 4b4d7e2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cli/command/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,12 @@ func RegistryAuthenticationPrivilegedFunc(cli Cli, index *registrytypes.IndexInf
}
}

// ResolveAuthConfig is like registry.ResolveAuthConfig, but if using the
// default index, it uses the default index name for the daemon's platform,
// not the client's platform.
// ResolveAuthConfig returns auth-config for the given registry from the
// credential-store. It returns an empty AuthConfig if no credentials were
// found.
//
// It is similar to [registry.ResolveAuthConfig], but uses the credentials-
// store, instead of looking up credentials from a map.
func ResolveAuthConfig(_ context.Context, cli Cli, index *registrytypes.IndexInfo) types.AuthConfig {
configKey := index.Name
if index.Official {
Expand Down

0 comments on commit 4b4d7e2

Please sign in to comment.