diff --git a/docs/auth.go b/docs/auth.go index c3f09a42..e21ee4bc 100644 --- a/docs/auth.go +++ b/docs/auth.go @@ -38,7 +38,7 @@ func loginV1(authConfig *cliconfig.AuthConfig, registryEndpoint *Endpoint) (stri loginAgainstOfficialIndex := serverAddress == IndexServer - // to avoid sending the server address to the server it should be removed before being marshalled + // to avoid sending the server address to the server it should be removed before being marshaled authCopy := *authConfig authCopy.ServerAddress = "" diff --git a/docs/endpoint.go b/docs/endpoint.go index 20805767..72892a99 100644 --- a/docs/endpoint.go +++ b/docs/endpoint.go @@ -125,7 +125,7 @@ type Endpoint struct { URLBuilder *v2.URLBuilder } -// Get the formated URL for the root of this registry Endpoint +// Get the formatted URL for the root of this registry Endpoint func (e *Endpoint) String() string { return fmt.Sprintf("%s/v%d/", e.URL, e.Version) } diff --git a/docs/session.go b/docs/session.go index 5017aeac..cecf936b 100644 --- a/docs/session.go +++ b/docs/session.go @@ -100,8 +100,8 @@ func (tr *authTransport) RoundTrip(orig *http.Request) (*http.Response, error) { // Authorization should not be set on 302 redirect for untrusted locations. // This logic mirrors the behavior in addRequiredHeadersToRedirectedRequests. // As the authorization logic is currently implemented in RoundTrip, - // a 302 redirect is detected by looking at the Referer header as go http package adds said header. - // This is safe as Docker doesn't set Referer in other scenarios. + // a 302 redirect is detected by looking at the Referrer header as go http package adds said header. + // This is safe as Docker doesn't set Referrer in other scenarios. if orig.Header.Get("Referer") != "" && !trustedLocation(orig) { return tr.RoundTripper.RoundTrip(orig) } diff --git a/docs/types.go b/docs/types.go index 8a201a91..9b2562f9 100644 --- a/docs/types.go +++ b/docs/types.go @@ -26,7 +26,7 @@ type SearchResults struct { Query string `json:"query"` // NumResults indicates the number of results the query returned NumResults int `json:"num_results"` - // Results is a slice containing the acutal results for the search + // Results is a slice containing the actual results for the search Results []SearchResult `json:"results"` }