Skip to content

Commit 25eb66f

Browse files
committed
cli/command: remove NewAuthRequester as its now unused
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent ae798f1 commit 25eb66f

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

cli/command/registry.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,6 @@ const (
3434
// [registry.IndexServer]: https://pkg.go.dev/github.com/docker/docker/registry#IndexServer
3535
const authConfigKey = "https://index.docker.io/v1/"
3636

37-
// NewAuthRequester returns a RequestPrivilegeFunc for the specified registry
38-
// and the given cmdName (used as informational message to the user).
39-
//
40-
// The returned function is a [registrytypes.RequestAuthConfig] to prompt the user
41-
// for credentials if needed. It is called as fallback if the credentials (if any)
42-
// used for the initial operation did not work.
43-
//
44-
// TODO(thaJeztah): cli Cli could be a Streams if it was not for cli.SetIn to be needed?
45-
// TODO(thaJeztah): ideally, this would accept reposName / imageRef as a regular string (we can parse it if needed!), or .. maybe generics and accept either?
46-
func NewAuthRequester(cli Cli, indexServer string, promptMsg string) registrytypes.RequestAuthConfig {
47-
configKey := getAuthConfigKey(indexServer)
48-
return newPrivilegeFunc(cli, configKey, promptMsg)
49-
}
50-
5137
// RegistryAuthenticationPrivilegedFunc returns a RequestPrivilegeFunc from the specified registry index info
5238
// for the given command to prompt the user for username and password.
5339
//

0 commit comments

Comments
 (0)