From 2fe3442035e01805e2117788f9facdbcce354f44 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Tue, 23 Apr 2024 17:48:53 +0800 Subject: [PATCH] chore: fix some typos in comments Signed-off-by: guoguangwu --- registry/api/v2/urls.go | 2 +- registry/auth/auth.go | 2 +- registry/auth/token/accesscontroller.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/registry/api/v2/urls.go b/registry/api/v2/urls.go index 1a76565aa..80617fd3d 100644 --- a/registry/api/v2/urls.go +++ b/registry/api/v2/urls.go @@ -202,7 +202,7 @@ func (ub *URLBuilder) BuildBlobUploadChunkURL(name reference.Named, uuid string, return appendValuesURL(uploadURL, values...).String(), nil } -// clondedRoute returns a clone of the named route from the router. Routes +// cloneRoute returns a clone of the named route from the router. Routes // must be cloned to avoid modifying them during url generation. func (ub *URLBuilder) cloneRoute(name string) clonedRoute { route := new(mux.Route) diff --git a/registry/auth/auth.go b/registry/auth/auth.go index b23e527ac..687002c3b 100644 --- a/registry/auth/auth.go +++ b/registry/auth/auth.go @@ -46,7 +46,7 @@ var ( ) // InitFunc is the type of an AccessController factory function and is used -// to register the constructor for different AccesController backends. +// to register the constructor for different AccessController backends. type InitFunc func(options map[string]interface{}) (AccessController, error) var accessControllers map[string]InitFunc diff --git a/registry/auth/token/accesscontroller.go b/registry/auth/token/accesscontroller.go index b88268e31..bf7d222fc 100644 --- a/registry/auth/token/accesscontroller.go +++ b/registry/auth/token/accesscontroller.go @@ -127,7 +127,7 @@ func (ac authChallenge) challengeParams(r *http.Request) string { return str } -// SetChallenge sets the WWW-Authenticate value for the response. +// SetHeaders sets the WWW-Authenticate value for the response. func (ac authChallenge) SetHeaders(r *http.Request, w http.ResponseWriter) { w.Header().Add("WWW-Authenticate", ac.challengeParams(r)) }