From 5bd359132b20af4fa3a7f6627146eb5ad0c5caf6 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 12 Apr 2023 10:23:47 +0200 Subject: [PATCH] cli/command: fix documentation for ResolveAuthConfig 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 --- cli/command/registry.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cli/command/registry.go b/cli/command/registry.go index 7ed01b55f4..22c5cff0c2 100644 --- a/cli/command/registry.go +++ b/cli/command/registry.go @@ -49,9 +49,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) registrytypes.AuthConfig { configKey := index.Name if index.Official {