diff --git a/.gometalinter.json b/.gometalinter.json index 08fe705d..0ceaa139 100644 --- a/.gometalinter.json +++ b/.gometalinter.json @@ -4,6 +4,8 @@ "Sort": ["linter", "severity", "path", "line"], "EnableGC": true, "Enable": [ + "structcheck", + "gofmt", "golint", "vet" diff --git a/registry/api/v2/routes.go b/registry/api/v2/routes.go index 5b80d5be..9612ac2e 100644 --- a/registry/api/v2/routes.go +++ b/registry/api/v2/routes.go @@ -14,15 +14,6 @@ const ( RouteNameCatalog = "catalog" ) -var allEndpoints = []string{ - RouteNameManifest, - RouteNameCatalog, - RouteNameTags, - RouteNameBlob, - RouteNameBlobUpload, - RouteNameBlobUploadChunk, -} - // Router builds a gorilla router with named routes for the various API // methods. This can be used directly by both server implementations and // clients. diff --git a/registry/client/auth/session.go b/registry/client/auth/session.go index db86c9b0..aad8a0e6 100644 --- a/registry/client/auth/session.go +++ b/registry/client/auth/session.go @@ -68,7 +68,6 @@ func NewAuthorizer(manager challenge.Manager, handlers ...AuthenticationHandler) type endpointAuthorizer struct { challenges challenge.Manager handlers []AuthenticationHandler - transport http.RoundTripper } func (ea *endpointAuthorizer) ModifyRequest(req *http.Request) error { @@ -121,7 +120,6 @@ type clock interface { } type tokenHandler struct { - header http.Header creds CredentialStore transport http.RoundTripper clock clock diff --git a/registry/client/repository.go b/registry/client/repository.go index d8e2c795..aa442e65 100644 --- a/registry/client/repository.go +++ b/registry/client/repository.go @@ -81,9 +81,8 @@ func NewRegistry(baseURL string, transport http.RoundTripper) (Registry, error) } type registry struct { - client *http.Client - ub *v2.URLBuilder - context context.Context + client *http.Client + ub *v2.URLBuilder } // Repositories returns a lexigraphically sorted catalog given a base URL. The 'entries' slice will be filled up to the size @@ -152,10 +151,9 @@ func NewRepository(name reference.Named, baseURL string, transport http.RoundTri } type repository struct { - client *http.Client - ub *v2.URLBuilder - context context.Context - name reference.Named + client *http.Client + ub *v2.URLBuilder + name reference.Named } func (r *repository) Named() reference.Named {