From 795e11d5fb2c7b8345220f252793c25a1b38d6a9 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Mon, 6 Aug 2018 12:12:07 -0700 Subject: [PATCH] Enable goimports check Validates that goimports has been run on all files Signed-off-by: Derek McGowan --- .gometalinter.json | 1 + notifications/endpoint.go | 3 ++- registry/storage/driver/base/base.go | 2 +- registry/storage/driver/middleware/cloudfront/s3filter_test.go | 3 ++- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gometalinter.json b/.gometalinter.json index 08fe705d..862c6307 100644 --- a/.gometalinter.json +++ b/.gometalinter.json @@ -5,6 +5,7 @@ "EnableGC": true, "Enable": [ "gofmt", + "goimports", "golint", "vet" ] diff --git a/notifications/endpoint.go b/notifications/endpoint.go index 285995ec..a8a52d0c 100644 --- a/notifications/endpoint.go +++ b/notifications/endpoint.go @@ -1,9 +1,10 @@ package notifications import ( - "github.com/docker/distribution/configuration" "net/http" "time" + + "github.com/docker/distribution/configuration" ) // EndpointConfig covers the optional configuration parameters for an active diff --git a/registry/storage/driver/base/base.go b/registry/storage/driver/base/base.go index ab55b022..4511f002 100644 --- a/registry/storage/driver/base/base.go +++ b/registry/storage/driver/base/base.go @@ -40,12 +40,12 @@ package base import ( "context" "io" + "time" dcontext "github.com/docker/distribution/context" prometheus "github.com/docker/distribution/metrics" storagedriver "github.com/docker/distribution/registry/storage/driver" "github.com/docker/go-metrics" - "time" ) var ( diff --git a/registry/storage/driver/middleware/cloudfront/s3filter_test.go b/registry/storage/driver/middleware/cloudfront/s3filter_test.go index 6aca3abc..7ff60fda 100644 --- a/registry/storage/driver/middleware/cloudfront/s3filter_test.go +++ b/registry/storage/driver/middleware/cloudfront/s3filter_test.go @@ -5,13 +5,14 @@ import ( "crypto/rand" "encoding/json" "fmt" - dcontext "github.com/docker/distribution/context" "net" "net/http" "net/http/httptest" "testing" "time" + dcontext "github.com/docker/distribution/context" + "reflect" // used as a replacement for testify )