From eb82fe87a5d557062a649564494ac62f93946350 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 2 Mar 2025 12:38:27 +0100 Subject: [PATCH] cli/trust: make NotaryServer a const This var used to be vendored from github.com/docker/docker/registry, but was removed there, and made a local var in a1cbaa827b5cfc2516b8dde407e4dabe0f9378f6. It is (and should never be) modified, so let's change it into a const. Signed-off-by: Sebastiaan van Stijn --- cli/trust/trust.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cli/trust/trust.go b/cli/trust/trust.go index bb7e597aa5..65beb3aa4e 100644 --- a/cli/trust/trust.go +++ b/cli/trust/trust.go @@ -40,10 +40,11 @@ var ( ActionsPullOnly = []string{"pull"} // ActionsPushAndPull defines the actions for read-write interactions with a Notary Repository ActionsPushAndPull = []string{"pull", "push"} - // NotaryServer is the endpoint serving the Notary trust server - NotaryServer = "https://notary.docker.io" ) +// NotaryServer is the endpoint serving the Notary trust server +const NotaryServer = "https://notary.docker.io" + // GetTrustDirectory returns the base trust directory name func GetTrustDirectory() string { return filepath.Join(config.Dir(), "trust")