diff options
author | Alejandro Rodríguez <alejorro70@gmail.com> | 2018-10-15 06:37:36 +0300 |
---|---|---|
committer | Alejandro Rodríguez <alejorro70@gmail.com> | 2018-10-15 06:48:41 +0300 |
commit | 90e4c24f1ec8af0b2358185cbafaabddf205be27 (patch) | |
tree | eb419646c4b25093f1f3f066301d62e26fd10980 | |
parent | bff767c7c98f12ef011a40de2e0dfe318ca620f4 (diff) |
Fix formatting
191 files changed, 191 insertions, 425 deletions
diff --git a/client/receive_pack.go b/client/receive_pack.go index 3d33acb55..767b392e5 100644 --- a/client/receive_pack.go +++ b/client/receive_pack.go @@ -5,7 +5,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/streamio" - "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/client/upload_archive.go b/client/upload_archive.go index 9bcc9fc82..2459519b3 100644 --- a/client/upload_archive.go +++ b/client/upload_archive.go @@ -5,7 +5,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/streamio" - "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/client/upload_pack.go b/client/upload_pack.go index ed3dd796c..08372c5fc 100644 --- a/client/upload_pack.go +++ b/client/upload_pack.go @@ -5,7 +5,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/streamio" - "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/cmd/gitaly/main.go b/cmd/gitaly/main.go index 591387a59..9bacea720 100644 --- a/cmd/gitaly/main.go +++ b/cmd/gitaly/main.go @@ -9,8 +9,9 @@ import ( "os/signal" "syscall" + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promhttp" log "github.com/sirupsen/logrus" - "gitlab.com/gitlab-org/gitaly/internal/config" "gitlab.com/gitlab-org/gitaly/internal/connectioncounter" "gitlab.com/gitlab-org/gitaly/internal/git" @@ -19,9 +20,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/server" "gitlab.com/gitlab-org/gitaly/internal/tempdir" "gitlab.com/gitlab-org/gitaly/internal/version" - - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promhttp" ) var ( diff --git a/internal/command/command.go b/internal/command/command.go index e57862ad6..4a0ca8e34 100644 --- a/internal/command/command.go +++ b/internal/command/command.go @@ -11,10 +11,9 @@ import ( "syscall" "time" - "gitlab.com/gitlab-org/gitaly/internal/config" - "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" log "github.com/sirupsen/logrus" + "gitlab.com/gitlab-org/gitaly/internal/config" ) // exportedEnvVars contains a list of environment variables diff --git a/internal/config/config.go b/internal/config/config.go index 83683d386..eb796acd3 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -8,10 +8,9 @@ import ( "path/filepath" "strings" - log "github.com/sirupsen/logrus" - "github.com/BurntSushi/toml" "github.com/kelseyhightower/envconfig" + log "github.com/sirupsen/logrus" ) var ( diff --git a/internal/git/catfile/batchcheck.go b/internal/git/catfile/batchcheck.go index 2e5903b80..a0846802c 100644 --- a/internal/git/catfile/batchcheck.go +++ b/internal/git/catfile/batchcheck.go @@ -9,7 +9,6 @@ import ( "sync" "gitlab.com/gitlab-org/gitaly/internal/command" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/git/catfile/catfile_test.go b/internal/git/catfile/catfile_test.go index 4c7e75bc3..386f1d2b0 100644 --- a/internal/git/catfile/catfile_test.go +++ b/internal/git/catfile/catfile_test.go @@ -5,9 +5,8 @@ import ( "io/ioutil" "testing" - "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "github.com/stretchr/testify/require" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) func TestInfo(t *testing.T) { diff --git a/internal/git/log/commit.go b/internal/git/log/commit.go index 6c84090a5..0ded22414 100644 --- a/internal/git/log/commit.go +++ b/internal/git/log/commit.go @@ -8,12 +8,11 @@ import ( "strconv" "strings" + "github.com/golang/protobuf/ptypes/timestamp" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/git/catfile" "gitlab.com/gitlab-org/gitaly/internal/helper" - - "github.com/golang/protobuf/ptypes/timestamp" ) // GetCommit tries to resolve revision to a Git commit. Returns nil if diff --git a/internal/git/log/last_commit.go b/internal/git/log/last_commit.go index 40346659b..872b5b2bd 100644 --- a/internal/git/log/last_commit.go +++ b/internal/git/log/last_commit.go @@ -5,12 +5,11 @@ import ( "io/ioutil" "strings" + "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" + log "github.com/sirupsen/logrus" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/command" "gitlab.com/gitlab-org/gitaly/internal/git" - - "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" - log "github.com/sirupsen/logrus" ) // LastCommitForPath returns the last commit which modified path. diff --git a/internal/helper/repo.go b/internal/helper/repo.go index 33a893421..46a3cfca2 100644 --- a/internal/helper/repo.go +++ b/internal/helper/repo.go @@ -6,7 +6,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/config" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/helper/repo_test.go b/internal/helper/repo_test.go index 037831f23..ca2c43cc2 100644 --- a/internal/helper/repo_test.go +++ b/internal/helper/repo_test.go @@ -5,11 +5,10 @@ import ( "path" "testing" + "github.com/stretchr/testify/assert" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/config" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/assert" "google.golang.org/grpc/codes" ) diff --git a/internal/helper/storage.go b/internal/helper/storage.go index 7dcdd4e37..5405421ce 100644 --- a/internal/helper/storage.go +++ b/internal/helper/storage.go @@ -6,7 +6,6 @@ import ( "fmt" "gitlab.com/gitlab-org/gitaly/internal/storage" - "golang.org/x/net/context" "google.golang.org/grpc/metadata" ) diff --git a/internal/helper/storage_test.go b/internal/helper/storage_test.go index ee273afbb..d0f229e0e 100644 --- a/internal/helper/storage_test.go +++ b/internal/helper/storage_test.go @@ -4,10 +4,9 @@ import ( "encoding/base64" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly/internal/storage" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "google.golang.org/grpc/metadata" ) diff --git a/internal/middleware/limithandler/concurrency_limiter_test.go b/internal/middleware/limithandler/concurrency_limiter_test.go index ebf9b378a..e89dbcb97 100644 --- a/internal/middleware/limithandler/concurrency_limiter_test.go +++ b/internal/middleware/limithandler/concurrency_limiter_test.go @@ -7,7 +7,6 @@ import ( "time" "github.com/stretchr/testify/assert" - "golang.org/x/net/context" ) diff --git a/internal/middleware/limithandler/metrics.go b/internal/middleware/limithandler/metrics.go index 96a5cc369..0746c04e1 100644 --- a/internal/middleware/limithandler/metrics.go +++ b/internal/middleware/limithandler/metrics.go @@ -4,9 +4,8 @@ import ( "strings" "time" - prom "github.com/prometheus/client_golang/prometheus" - "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" + prom "github.com/prometheus/client_golang/prometheus" "golang.org/x/net/context" ) diff --git a/internal/middleware/panichandler/panic_handler.go b/internal/middleware/panichandler/panic_handler.go index 637a854e8..58f9c0abf 100644 --- a/internal/middleware/panichandler/panic_handler.go +++ b/internal/middleware/panichandler/panic_handler.go @@ -2,7 +2,6 @@ package panichandler import ( log "github.com/sirupsen/logrus" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/codes" diff --git a/internal/middleware/sentryhandler/sentryhandler.go b/internal/middleware/sentryhandler/sentryhandler.go index 4b1690892..5deff9e0d 100644 --- a/internal/middleware/sentryhandler/sentryhandler.go +++ b/internal/middleware/sentryhandler/sentryhandler.go @@ -1,15 +1,13 @@ package sentryhandler import ( + "fmt" "strings" "time" raven "github.com/getsentry/raven-go" "github.com/grpc-ecosystem/go-grpc-middleware/tags" "gitlab.com/gitlab-org/gitaly/internal/helper" - - "fmt" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/codes" diff --git a/internal/middleware/sentryhandler/sentryhandler_test.go b/internal/middleware/sentryhandler/sentryhandler_test.go index 5408cc836..2803d45dc 100644 --- a/internal/middleware/sentryhandler/sentryhandler_test.go +++ b/internal/middleware/sentryhandler/sentryhandler_test.go @@ -5,11 +5,10 @@ import ( "testing" "time" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "github.com/stretchr/testify/assert" "golang.org/x/net/context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) func Test_generateRavenPacket(t *testing.T) { diff --git a/internal/rubyserver/proxy.go b/internal/rubyserver/proxy.go index 0888506ef..98fe4bc2f 100644 --- a/internal/rubyserver/proxy.go +++ b/internal/rubyserver/proxy.go @@ -8,7 +8,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/helper" - "google.golang.org/grpc/metadata" ) diff --git a/internal/rubyserver/proxy_test.go b/internal/rubyserver/proxy_test.go index 397cafe09..5b804c061 100644 --- a/internal/rubyserver/proxy_test.go +++ b/internal/rubyserver/proxy_test.go @@ -3,9 +3,8 @@ package rubyserver import ( "testing" - "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "github.com/stretchr/testify/require" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" "google.golang.org/grpc/metadata" ) diff --git a/internal/rubyserver/rubyserver.go b/internal/rubyserver/rubyserver.go index fa4d9db9b..1e5112b16 100644 --- a/internal/rubyserver/rubyserver.go +++ b/internal/rubyserver/rubyserver.go @@ -11,6 +11,8 @@ import ( "sync" "time" + "github.com/grpc-ecosystem/go-grpc-prometheus" + log "github.com/sirupsen/logrus" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/command" "gitlab.com/gitlab-org/gitaly/internal/config" @@ -20,9 +22,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/supervisor" "gitlab.com/gitlab-org/gitaly/internal/version" "gitlab.com/gitlab-org/gitaly/streamio" - - "github.com/grpc-ecosystem/go-grpc-prometheus" - log "github.com/sirupsen/logrus" "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/internal/rubyserver/rubyserver_test.go b/internal/rubyserver/rubyserver_test.go index 2e598fe8b..68eddd548 100644 --- a/internal/rubyserver/rubyserver_test.go +++ b/internal/rubyserver/rubyserver_test.go @@ -5,10 +5,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "google.golang.org/grpc/codes" ) diff --git a/internal/rubyserver/worker.go b/internal/rubyserver/worker.go index ca566d093..4dd44ae8f 100644 --- a/internal/rubyserver/worker.go +++ b/internal/rubyserver/worker.go @@ -5,12 +5,11 @@ import ( "syscall" "time" + "github.com/prometheus/client_golang/prometheus" + log "github.com/sirupsen/logrus" "gitlab.com/gitlab-org/gitaly/internal/config" "gitlab.com/gitlab-org/gitaly/internal/rubyserver/balancer" "gitlab.com/gitlab-org/gitaly/internal/supervisor" - - "github.com/prometheus/client_golang/prometheus" - log "github.com/sirupsen/logrus" ) var ( diff --git a/internal/server/auth/auth.go b/internal/server/auth/auth.go index 69445d049..33fb6eb92 100644 --- a/internal/server/auth/auth.go +++ b/internal/server/auth/auth.go @@ -3,11 +3,10 @@ package auth import ( "time" - "gitlab.com/gitlab-org/gitaly/auth" - "gitlab.com/gitlab-org/gitaly/internal/config" - "github.com/grpc-ecosystem/go-grpc-middleware/auth" "github.com/prometheus/client_golang/prometheus" + "gitlab.com/gitlab-org/gitaly/auth" + "gitlab.com/gitlab-org/gitaly/internal/config" "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/codes" diff --git a/internal/server/auth_test.go b/internal/server/auth_test.go index e93b96bf3..b50445a84 100644 --- a/internal/server/auth_test.go +++ b/internal/server/auth_test.go @@ -5,12 +5,11 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly/auth" "gitlab.com/gitlab-org/gitaly/internal/config" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" netctx "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/codes" diff --git a/internal/server/server.go b/internal/server/server.go index cdc954a3d..3abcceaeb 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -1,10 +1,11 @@ package server import ( - "golang.org/x/net/context" - + "github.com/grpc-ecosystem/go-grpc-middleware" + "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" + "github.com/grpc-ecosystem/go-grpc-middleware/tags" + "github.com/grpc-ecosystem/go-grpc-prometheus" log "github.com/sirupsen/logrus" - "gitlab.com/gitlab-org/gitaly/internal/helper/fieldextractors" gitalylog "gitlab.com/gitlab-org/gitaly/internal/log" "gitlab.com/gitlab-org/gitaly/internal/logsanitizer" @@ -16,12 +17,7 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/rubyserver" "gitlab.com/gitlab-org/gitaly/internal/server/auth" "gitlab.com/gitlab-org/gitaly/internal/service" - - "github.com/grpc-ecosystem/go-grpc-middleware" - "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" - "github.com/grpc-ecosystem/go-grpc-middleware/tags" - "github.com/grpc-ecosystem/go-grpc-prometheus" - + "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/reflection" ) diff --git a/internal/service/blob/get_blob.go b/internal/service/blob/get_blob.go index eb52e2ad3..0069ec778 100644 --- a/internal/service/blob/get_blob.go +++ b/internal/service/blob/get_blob.go @@ -7,9 +7,7 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git/catfile" "gitlab.com/gitlab-org/gitaly/internal/helper" - "gitlab.com/gitlab-org/gitaly/streamio" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/blob/get_blob_test.go b/internal/service/blob/get_blob_test.go index 08f7d0c86..4f5bb7a37 100644 --- a/internal/service/blob/get_blob_test.go +++ b/internal/service/blob/get_blob_test.go @@ -6,11 +6,10 @@ import ( "io" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "gitlab.com/gitlab-org/gitaly/streamio" - - "github.com/stretchr/testify/require" ) func TestSuccessfulGetBlob(t *testing.T) { diff --git a/internal/service/blob/get_blobs.go b/internal/service/blob/get_blobs.go index 8b40bf2d7..4bb70ee5f 100644 --- a/internal/service/blob/get_blobs.go +++ b/internal/service/blob/get_blobs.go @@ -8,7 +8,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/git/catfile" "gitlab.com/gitlab-org/gitaly/internal/service/commit" "gitlab.com/gitlab-org/gitaly/streamio" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/blob/get_blobs_test.go b/internal/service/blob/get_blobs_test.go index d00ec631c..85b0ca23d 100644 --- a/internal/service/blob/get_blobs_test.go +++ b/internal/service/blob/get_blobs_test.go @@ -6,10 +6,9 @@ import ( "path" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" ) diff --git a/internal/service/blob/lfs_pointers.go b/internal/service/blob/lfs_pointers.go index 4e012cfde..e83fe3504 100644 --- a/internal/service/blob/lfs_pointers.go +++ b/internal/service/blob/lfs_pointers.go @@ -6,7 +6,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/blob/lfs_pointers_test.go b/internal/service/blob/lfs_pointers_test.go index 4a741f148..bdf1d4134 100644 --- a/internal/service/blob/lfs_pointers_test.go +++ b/internal/service/blob/lfs_pointers_test.go @@ -5,10 +5,9 @@ import ( "os/exec" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" ) diff --git a/internal/service/blob/testhelper_test.go b/internal/service/blob/testhelper_test.go index f566d43af..19a7bc534 100644 --- a/internal/service/blob/testhelper_test.go +++ b/internal/service/blob/testhelper_test.go @@ -10,7 +10,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "google.golang.org/grpc" "google.golang.org/grpc/reflection" ) diff --git a/internal/service/commit/between_test.go b/internal/service/commit/between_test.go index b5d3f18f2..8f6fdd1cc 100644 --- a/internal/service/commit/between_test.go +++ b/internal/service/commit/between_test.go @@ -5,7 +5,6 @@ import ( "testing" "github.com/golang/protobuf/ptypes/timestamp" - "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" diff --git a/internal/service/commit/commit_messages.go b/internal/service/commit/commit_messages.go index 167fac4bd..7d041ae94 100644 --- a/internal/service/commit/commit_messages.go +++ b/internal/service/commit/commit_messages.go @@ -5,7 +5,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/commit/commit_messages_test.go b/internal/service/commit/commit_messages_test.go index a21060fd9..48bda1007 100644 --- a/internal/service/commit/commit_messages_test.go +++ b/internal/service/commit/commit_messages_test.go @@ -5,11 +5,10 @@ import ( "strings" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" ) diff --git a/internal/service/commit/commit_signatures.go b/internal/service/commit/commit_signatures.go index a24a5e436..d6982a7af 100644 --- a/internal/service/commit/commit_signatures.go +++ b/internal/service/commit/commit_signatures.go @@ -5,7 +5,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/commit/commit_signatures_test.go b/internal/service/commit/commit_signatures_test.go index 60a36b1af..69640cda5 100644 --- a/internal/service/commit/commit_signatures_test.go +++ b/internal/service/commit/commit_signatures_test.go @@ -4,10 +4,9 @@ import ( "io" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" ) diff --git a/internal/service/commit/commits_by_message_test.go b/internal/service/commit/commits_by_message_test.go index ba4cd69a3..ca183c3ef 100644 --- a/internal/service/commit/commits_by_message_test.go +++ b/internal/service/commit/commits_by_message_test.go @@ -4,11 +4,10 @@ import ( "io" "testing" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" - "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "github.com/golang/protobuf/ptypes/timestamp" "github.com/stretchr/testify/require" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/commit/commits_helper.go b/internal/service/commit/commits_helper.go index 5f2c2572f..83b079070 100644 --- a/internal/service/commit/commits_helper.go +++ b/internal/service/commit/commits_helper.go @@ -3,10 +3,9 @@ package commit import ( "context" + "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git/log" - - "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" ) type commitsSender interface { diff --git a/internal/service/commit/count_commits.go b/internal/service/commit/count_commits.go index 9ab4858c4..1b4a96b32 100644 --- a/internal/service/commit/count_commits.go +++ b/internal/service/commit/count_commits.go @@ -7,10 +7,9 @@ import ( "strconv" "time" + "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git" - - "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/service/commit/count_commits_test.go b/internal/service/commit/count_commits_test.go index cdb86eb7a..ec0acae17 100644 --- a/internal/service/commit/count_commits_test.go +++ b/internal/service/commit/count_commits_test.go @@ -5,11 +5,10 @@ import ( "testing" "time" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" - "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "github.com/golang/protobuf/ptypes/timestamp" "github.com/stretchr/testify/require" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/commit/filter_shas_with_signatures_test.go b/internal/service/commit/filter_shas_with_signatures_test.go index d3045f1a5..dbda54e65 100644 --- a/internal/service/commit/filter_shas_with_signatures_test.go +++ b/internal/service/commit/filter_shas_with_signatures_test.go @@ -4,12 +4,10 @@ import ( "io" "testing" - "google.golang.org/grpc/codes" - "github.com/stretchr/testify/require" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" + "google.golang.org/grpc/codes" ) func TestFilterShasWithSignaturesSuccessful(t *testing.T) { diff --git a/internal/service/commit/find_all_commits.go b/internal/service/commit/find_all_commits.go index 9453f98a0..e6fc1049d 100644 --- a/internal/service/commit/find_all_commits.go +++ b/internal/service/commit/find_all_commits.go @@ -5,7 +5,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/service/ref" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/commit/find_all_commits_test.go b/internal/service/commit/find_all_commits_test.go index 1cb65ded6..e1e696b52 100644 --- a/internal/service/commit/find_all_commits_test.go +++ b/internal/service/commit/find_all_commits_test.go @@ -4,12 +4,11 @@ import ( "io" "testing" + "github.com/golang/protobuf/ptypes/timestamp" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/service/ref" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/golang/protobuf/ptypes/timestamp" - "github.com/stretchr/testify/require" "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/commit/find_commit.go b/internal/service/commit/find_commit.go index f44c4b6e7..a0a474e9f 100644 --- a/internal/service/commit/find_commit.go +++ b/internal/service/commit/find_commit.go @@ -4,7 +4,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/git/log" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/service/commit/find_commits.go b/internal/service/commit/find_commits.go index d8a1440c9..6aa4d7298 100644 --- a/internal/service/commit/find_commits.go +++ b/internal/service/commit/find_commits.go @@ -3,7 +3,6 @@ package commit import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/commit/find_commits_test.go b/internal/service/commit/find_commits_test.go index c3bc3c7e1..4027414e7 100644 --- a/internal/service/commit/find_commits_test.go +++ b/internal/service/commit/find_commits_test.go @@ -8,13 +8,11 @@ import ( "os/exec" "testing" - "google.golang.org/grpc/codes" - - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" - "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "github.com/golang/protobuf/ptypes/timestamp" "github.com/stretchr/testify/require" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" + "google.golang.org/grpc/codes" ) func TestFindCommitsFields(t *testing.T) { diff --git a/internal/service/commit/isancestor.go b/internal/service/commit/isancestor.go index eeca8ebae..88be2ec0f 100644 --- a/internal/service/commit/isancestor.go +++ b/internal/service/commit/isancestor.go @@ -2,15 +2,12 @@ package commit import ( "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "golang.org/x/net/context" - log "github.com/sirupsen/logrus" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git" + "golang.org/x/net/context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) func (s *server) CommitIsAncestor(ctx context.Context, in *gitalypb.CommitIsAncestorRequest) (*gitalypb.CommitIsAncestorResponse, error) { diff --git a/internal/service/commit/isancestor_test.go b/internal/service/commit/isancestor_test.go index 89948d380..1d958ef97 100644 --- a/internal/service/commit/isancestor_test.go +++ b/internal/service/commit/isancestor_test.go @@ -5,11 +5,10 @@ import ( "os/exec" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/commit/languages.go b/internal/service/commit/languages.go index 3ebde7dbe..052de5bf9 100644 --- a/internal/service/commit/languages.go +++ b/internal/service/commit/languages.go @@ -5,16 +5,14 @@ import ( "sort" "strings" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/linguist" "gitlab.com/gitlab-org/gitaly/internal/service/ref" - "golang.org/x/net/context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) func (*server) CommitLanguages(ctx context.Context, req *gitalypb.CommitLanguagesRequest) (*gitalypb.CommitLanguagesResponse, error) { diff --git a/internal/service/commit/languages_test.go b/internal/service/commit/languages_test.go index 5b3497f35..2d82a7712 100644 --- a/internal/service/commit/languages_test.go +++ b/internal/service/commit/languages_test.go @@ -4,10 +4,9 @@ import ( "context" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" ) func TestLanguages(t *testing.T) { diff --git a/internal/service/commit/last_commit_for_path.go b/internal/service/commit/last_commit_for_path.go index 1b528fdbf..9cf65f39c 100644 --- a/internal/service/commit/last_commit_for_path.go +++ b/internal/service/commit/last_commit_for_path.go @@ -5,7 +5,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git/log" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/service/commit/last_commit_for_path_test.go b/internal/service/commit/last_commit_for_path_test.go index 4dff1b648..33232e986 100644 --- a/internal/service/commit/last_commit_for_path_test.go +++ b/internal/service/commit/last_commit_for_path_test.go @@ -3,11 +3,10 @@ package commit import ( "testing" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" - "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "github.com/golang/protobuf/ptypes/timestamp" "github.com/stretchr/testify/require" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/commit/list_commits_by_oid_test.go b/internal/service/commit/list_commits_by_oid_test.go index 9b778e1a8..2c994c9e2 100644 --- a/internal/service/commit/list_commits_by_oid_test.go +++ b/internal/service/commit/list_commits_by_oid_test.go @@ -4,10 +4,9 @@ import ( "io" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "golang.org/x/net/context" ) diff --git a/internal/service/commit/list_files.go b/internal/service/commit/list_files.go index e1d5f1d49..96d108a65 100644 --- a/internal/service/commit/list_files.go +++ b/internal/service/commit/list_files.go @@ -5,13 +5,12 @@ import ( "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" log "github.com/sirupsen/logrus" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/helper/lines" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) func (s *server) ListFiles(in *gitalypb.ListFilesRequest, stream gitalypb.CommitService_ListFilesServer) error { diff --git a/internal/service/commit/list_files_test.go b/internal/service/commit/list_files_test.go index 2c0b55ab8..d1eb82112 100644 --- a/internal/service/commit/list_files_test.go +++ b/internal/service/commit/list_files_test.go @@ -6,13 +6,11 @@ import ( "io" "testing" - "golang.org/x/net/context" - - "google.golang.org/grpc/codes" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/service/ref" "gitlab.com/gitlab-org/gitaly/internal/testhelper" + "golang.org/x/net/context" + "google.golang.org/grpc/codes" ) var ( diff --git a/internal/service/commit/list_last_commits_for_tree.go b/internal/service/commit/list_last_commits_for_tree.go index c145bd0df..60d9c0952 100644 --- a/internal/service/commit/list_last_commits_for_tree.go +++ b/internal/service/commit/list_last_commits_for_tree.go @@ -5,14 +5,13 @@ import ( "io" "sort" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/command" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/git/log" "gitlab.com/gitlab-org/gitaly/internal/git/lstree" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) var ( diff --git a/internal/service/commit/list_last_commits_for_tree_test.go b/internal/service/commit/list_last_commits_for_tree_test.go index 49d2cc5f3..ed7e30dd5 100644 --- a/internal/service/commit/list_last_commits_for_tree_test.go +++ b/internal/service/commit/list_last_commits_for_tree_test.go @@ -4,10 +4,9 @@ import ( "io" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/commit/raw_blame.go b/internal/service/commit/raw_blame.go index aec6849a0..7b00475e5 100644 --- a/internal/service/commit/raw_blame.go +++ b/internal/service/commit/raw_blame.go @@ -4,11 +4,10 @@ import ( "fmt" "io" + "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/streamio" - - "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/commit/raw_blame_test.go b/internal/service/commit/raw_blame_test.go index 4406fac1a..034176c83 100644 --- a/internal/service/commit/raw_blame_test.go +++ b/internal/service/commit/raw_blame_test.go @@ -5,11 +5,10 @@ import ( "io/ioutil" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "gitlab.com/gitlab-org/gitaly/streamio" - - "github.com/stretchr/testify/require" "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/commit/stats.go b/internal/service/commit/stats.go index e8dc33fae..30605c808 100644 --- a/internal/service/commit/stats.go +++ b/internal/service/commit/stats.go @@ -1,11 +1,10 @@ package commit import ( - "golang.org/x/net/context" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" + "golang.org/x/net/context" ) func (s *server) CommitStats(ctx context.Context, in *gitalypb.CommitStatsRequest) (*gitalypb.CommitStatsResponse, error) { diff --git a/internal/service/commit/stats_test.go b/internal/service/commit/stats_test.go index 61f6bcfde..f9c7e847a 100644 --- a/internal/service/commit/stats_test.go +++ b/internal/service/commit/stats_test.go @@ -5,11 +5,9 @@ import ( "testing" "github.com/stretchr/testify/assert" - - "google.golang.org/grpc/codes" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" + "google.golang.org/grpc/codes" ) func TestCommitStatsSuccess(t *testing.T) { diff --git a/internal/service/commit/testhelper_test.go b/internal/service/commit/testhelper_test.go index c26bf5fef..4747082cc 100644 --- a/internal/service/commit/testhelper_test.go +++ b/internal/service/commit/testhelper_test.go @@ -6,13 +6,12 @@ import ( "testing" "time" + "github.com/golang/protobuf/ptypes/timestamp" + log "github.com/sirupsen/logrus" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/linguist" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/golang/protobuf/ptypes/timestamp" - log "github.com/sirupsen/logrus" "google.golang.org/grpc" "google.golang.org/grpc/reflection" ) diff --git a/internal/service/commit/tree_entries.go b/internal/service/commit/tree_entries.go index e6ac63377..37b755e9b 100644 --- a/internal/service/commit/tree_entries.go +++ b/internal/service/commit/tree_entries.go @@ -3,9 +3,8 @@ package commit import ( "fmt" - log "github.com/sirupsen/logrus" - "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" + log "github.com/sirupsen/logrus" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git/catfile" "google.golang.org/grpc/codes" diff --git a/internal/service/commit/tree_entries_test.go b/internal/service/commit/tree_entries_test.go index f8d310019..48a81a484 100644 --- a/internal/service/commit/tree_entries_test.go +++ b/internal/service/commit/tree_entries_test.go @@ -6,11 +6,10 @@ import ( "testing" "github.com/stretchr/testify/require" - "golang.org/x/net/context" - "google.golang.org/grpc/codes" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" + "golang.org/x/net/context" + "google.golang.org/grpc/codes" ) func TestSuccessfulGetTreeEntries(t *testing.T) { diff --git a/internal/service/commit/tree_entry.go b/internal/service/commit/tree_entry.go index ea0a5c088..0b054803d 100644 --- a/internal/service/commit/tree_entry.go +++ b/internal/service/commit/tree_entry.go @@ -9,7 +9,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/git/catfile" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/streamio" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/commit/tree_entry_test.go b/internal/service/commit/tree_entry_test.go index 5bf11378f..5d9a34f13 100644 --- a/internal/service/commit/tree_entry_test.go +++ b/internal/service/commit/tree_entry_test.go @@ -8,7 +8,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/conflicts/list_conflict_files_test.go b/internal/service/conflicts/list_conflict_files_test.go index d4fef5096..1570535aa 100644 --- a/internal/service/conflicts/list_conflict_files_test.go +++ b/internal/service/conflicts/list_conflict_files_test.go @@ -4,12 +4,10 @@ import ( "io" "testing" - "google.golang.org/grpc/codes" - "github.com/stretchr/testify/require" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" + "google.golang.org/grpc/codes" ) type conflictFile struct { diff --git a/internal/service/conflicts/testhelper_test.go b/internal/service/conflicts/testhelper_test.go index 947473da5..e58298096 100644 --- a/internal/service/conflicts/testhelper_test.go +++ b/internal/service/conflicts/testhelper_test.go @@ -7,13 +7,11 @@ import ( "time" log "github.com/sirupsen/logrus" - - "google.golang.org/grpc" - "google.golang.org/grpc/reflection" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" "gitlab.com/gitlab-org/gitaly/internal/testhelper" + "google.golang.org/grpc" + "google.golang.org/grpc/reflection" ) func TestMain(m *testing.M) { diff --git a/internal/service/diff/commit_test.go b/internal/service/diff/commit_test.go index 0e371843c..6c0feb938 100644 --- a/internal/service/diff/commit_test.go +++ b/internal/service/diff/commit_test.go @@ -6,11 +6,10 @@ import ( "io" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/diff" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/diff/patch_test.go b/internal/service/diff/patch_test.go index b849edfe9..dbe75c4f5 100644 --- a/internal/service/diff/patch_test.go +++ b/internal/service/diff/patch_test.go @@ -5,7 +5,6 @@ import ( "testing" "github.com/stretchr/testify/assert" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) diff --git a/internal/service/diff/raw.go b/internal/service/diff/raw.go index 46688aec7..73fde92e5 100644 --- a/internal/service/diff/raw.go +++ b/internal/service/diff/raw.go @@ -6,7 +6,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/streamio" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/service/diff/raw_test.go b/internal/service/diff/raw_test.go index a689fe1ad..e775d48dd 100644 --- a/internal/service/diff/raw_test.go +++ b/internal/service/diff/raw_test.go @@ -4,11 +4,10 @@ import ( "fmt" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "gitlab.com/gitlab-org/gitaly/streamio" - - "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" ) diff --git a/internal/service/diff/testhelper_test.go b/internal/service/diff/testhelper_test.go index 9031c33a3..29a370429 100644 --- a/internal/service/diff/testhelper_test.go +++ b/internal/service/diff/testhelper_test.go @@ -7,13 +7,11 @@ import ( "time" log "github.com/sirupsen/logrus" - - "google.golang.org/grpc" - "google.golang.org/grpc/reflection" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" "gitlab.com/gitlab-org/gitaly/internal/testhelper" + "google.golang.org/grpc" + "google.golang.org/grpc/reflection" ) func TestMain(m *testing.M) { diff --git a/internal/service/namespace/testhelper_test.go b/internal/service/namespace/testhelper_test.go index 5655839f0..3e08713d0 100644 --- a/internal/service/namespace/testhelper_test.go +++ b/internal/service/namespace/testhelper_test.go @@ -7,7 +7,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "google.golang.org/grpc" "google.golang.org/grpc/reflection" ) diff --git a/internal/service/operations/branches.go b/internal/service/operations/branches.go index e355f906a..9a8840ded 100644 --- a/internal/service/operations/branches.go +++ b/internal/service/operations/branches.go @@ -3,10 +3,9 @@ package operations import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" + "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - - "golang.org/x/net/context" ) func (s *server) UserCreateBranch(ctx context.Context, req *gitalypb.UserCreateBranchRequest) (*gitalypb.UserCreateBranchResponse, error) { diff --git a/internal/service/operations/branches_test.go b/internal/service/operations/branches_test.go index 3ae83d200..ab6d8e5d5 100644 --- a/internal/service/operations/branches_test.go +++ b/internal/service/operations/branches_test.go @@ -7,13 +7,12 @@ import ( "path" "testing" - "google.golang.org/grpc/codes" - "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git/log" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "golang.org/x/net/context" + "google.golang.org/grpc/codes" ) func TestSuccessfulUserCreateBranchRequest(t *testing.T) { diff --git a/internal/service/operations/cherry_pick_test.go b/internal/service/operations/cherry_pick_test.go index 1ad0b48d0..6326419ca 100644 --- a/internal/service/operations/cherry_pick_test.go +++ b/internal/service/operations/cherry_pick_test.go @@ -7,13 +7,12 @@ import ( "path" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git/log" serverPkg "gitlab.com/gitlab-org/gitaly/internal/server" "gitlab.com/gitlab-org/gitaly/internal/service/operations" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" diff --git a/internal/service/operations/commit_files_test.go b/internal/service/operations/commit_files_test.go index d43ea457b..ec76bad83 100644 --- a/internal/service/operations/commit_files_test.go +++ b/internal/service/operations/commit_files_test.go @@ -7,13 +7,12 @@ import ( "path" "testing" - "google.golang.org/grpc/codes" - "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git/log" "gitlab.com/gitlab-org/gitaly/internal/service/operations" "gitlab.com/gitlab-org/gitaly/internal/testhelper" + "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" ) diff --git a/internal/service/operations/merge_test.go b/internal/service/operations/merge_test.go index 41cea3221..1fdea95db 100644 --- a/internal/service/operations/merge_test.go +++ b/internal/service/operations/merge_test.go @@ -11,13 +11,11 @@ import ( "testing" "time" - "google.golang.org/grpc/codes" - + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" gitlog "gitlab.com/gitlab-org/gitaly/internal/git/log" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" ) var ( diff --git a/internal/service/operations/rebase.go b/internal/service/operations/rebase.go index dcb560f92..1fa5ea341 100644 --- a/internal/service/operations/rebase.go +++ b/internal/service/operations/rebase.go @@ -5,7 +5,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/service/operations/rebase_test.go b/internal/service/operations/rebase_test.go index f299af4bf..18fca0c68 100644 --- a/internal/service/operations/rebase_test.go +++ b/internal/service/operations/rebase_test.go @@ -7,11 +7,10 @@ import ( "strings" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/service/operations" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" ) diff --git a/internal/service/operations/revert_test.go b/internal/service/operations/revert_test.go index fea3784ae..340fb6416 100644 --- a/internal/service/operations/revert_test.go +++ b/internal/service/operations/revert_test.go @@ -6,12 +6,11 @@ import ( "path" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git/log" "gitlab.com/gitlab-org/gitaly/internal/service/operations" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" ) diff --git a/internal/service/operations/tags.go b/internal/service/operations/tags.go index 7377ccf33..09827d81a 100644 --- a/internal/service/operations/tags.go +++ b/internal/service/operations/tags.go @@ -3,7 +3,6 @@ package operations import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "golang.org/x/net/context" ) diff --git a/internal/service/operations/tags_test.go b/internal/service/operations/tags_test.go index f47ebc207..385711a11 100644 --- a/internal/service/operations/tags_test.go +++ b/internal/service/operations/tags_test.go @@ -8,11 +8,10 @@ import ( "strings" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git/log" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" ) diff --git a/internal/service/operations/testhelper_test.go b/internal/service/operations/testhelper_test.go index 9c7c7c6df..a00079868 100644 --- a/internal/service/operations/testhelper_test.go +++ b/internal/service/operations/testhelper_test.go @@ -9,12 +9,11 @@ import ( "testing" "time" + log "github.com/sirupsen/logrus" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - log "github.com/sirupsen/logrus" - "github.com/stretchr/testify/require" "google.golang.org/grpc" "google.golang.org/grpc/reflection" ) diff --git a/internal/service/ref/branches.go b/internal/service/ref/branches.go index 3f5aec1e7..6d03816f7 100644 --- a/internal/service/ref/branches.go +++ b/internal/service/ref/branches.go @@ -3,7 +3,6 @@ package ref import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "golang.org/x/net/context" ) diff --git a/internal/service/ref/branches_test.go b/internal/service/ref/branches_test.go index 7fe679779..104ff21a7 100644 --- a/internal/service/ref/branches_test.go +++ b/internal/service/ref/branches_test.go @@ -5,11 +5,10 @@ import ( "os/exec" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git/log" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" ) diff --git a/internal/service/ref/delete_refs_test.go b/internal/service/ref/delete_refs_test.go index 491bc80e4..a87318cf0 100644 --- a/internal/service/ref/delete_refs_test.go +++ b/internal/service/ref/delete_refs_test.go @@ -3,12 +3,10 @@ package ref import ( "testing" - "google.golang.org/grpc/codes" - "github.com/stretchr/testify/require" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" + "google.golang.org/grpc/codes" ) func TestSuccessfulDeleteRefs(t *testing.T) { diff --git a/internal/service/ref/refexists.go b/internal/service/ref/refexists.go index 6ed3b2bce..819ff656a 100644 --- a/internal/service/ref/refexists.go +++ b/internal/service/ref/refexists.go @@ -5,13 +5,12 @@ import ( "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" log "github.com/sirupsen/logrus" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/command" "gitlab.com/gitlab-org/gitaly/internal/git" "golang.org/x/net/context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) // RefExists returns true if the given reference exists. The ref must start with the string `ref/` diff --git a/internal/service/ref/refexists_test.go b/internal/service/ref/refexists_test.go index 69e4bdf44..44fa71d93 100644 --- a/internal/service/ref/refexists_test.go +++ b/internal/service/ref/refexists_test.go @@ -3,11 +3,10 @@ package ref import ( "testing" - "google.golang.org/grpc/codes" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/testhelper" + "google.golang.org/grpc/codes" ) func TestRefExists(t *testing.T) { diff --git a/internal/service/ref/refname.go b/internal/service/ref/refname.go index d1e22a09e..accf22f7e 100644 --- a/internal/service/ref/refname.go +++ b/internal/service/ref/refname.go @@ -4,14 +4,13 @@ import ( "bufio" "strings" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" log "github.com/sirupsen/logrus" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git" "golang.org/x/net/context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) // FindRefName returns a ref that starts with the given prefix, if one exists. diff --git a/internal/service/ref/refname_test.go b/internal/service/ref/refname_test.go index 72cd3fc60..497135a25 100644 --- a/internal/service/ref/refname_test.go +++ b/internal/service/ref/refname_test.go @@ -3,13 +3,11 @@ package ref import ( "testing" - "google.golang.org/grpc/codes" - - "golang.org/x/net/context" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/testhelper" + "golang.org/x/net/context" + "google.golang.org/grpc/codes" ) func TestFindRefNameSuccess(t *testing.T) { diff --git a/internal/service/ref/refs.go b/internal/service/ref/refs.go index 86707bcca..904723183 100644 --- a/internal/service/ref/refs.go +++ b/internal/service/ref/refs.go @@ -8,17 +8,15 @@ import ( "strings" "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" - log "github.com/sirupsen/logrus" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/git/catfile" "gitlab.com/gitlab-org/gitaly/internal/helper/lines" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" "golang.org/x/net/context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) var ( diff --git a/internal/service/ref/tag_messages.go b/internal/service/ref/tag_messages.go index 53c5fbef0..574d2c859 100644 --- a/internal/service/ref/tag_messages.go +++ b/internal/service/ref/tag_messages.go @@ -5,7 +5,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/ref/tag_messages_test.go b/internal/service/ref/tag_messages_test.go index 15a2cf322..cb1b0117e 100644 --- a/internal/service/ref/tag_messages_test.go +++ b/internal/service/ref/tag_messages_test.go @@ -5,11 +5,10 @@ import ( "strings" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" ) diff --git a/internal/service/ref/testhelper_test.go b/internal/service/ref/testhelper_test.go index 1d698f9fd..10cfa05e7 100644 --- a/internal/service/ref/testhelper_test.go +++ b/internal/service/ref/testhelper_test.go @@ -9,7 +9,6 @@ import ( "github.com/golang/protobuf/ptypes/timestamp" log "github.com/sirupsen/logrus" - "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/helper/lines" diff --git a/internal/service/register.go b/internal/service/register.go index f0b95047e..49190bc2b 100644 --- a/internal/service/register.go +++ b/internal/service/register.go @@ -17,7 +17,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/service/ssh" "gitlab.com/gitlab-org/gitaly/internal/service/storage" "gitlab.com/gitlab-org/gitaly/internal/service/wiki" - "google.golang.org/grpc" "google.golang.org/grpc/health" healthpb "google.golang.org/grpc/health/grpc_health_v1" diff --git a/internal/service/remote/fetch_internal_remote.go b/internal/service/remote/fetch_internal_remote.go index 36e550b16..15961aa29 100644 --- a/internal/service/remote/fetch_internal_remote.go +++ b/internal/service/remote/fetch_internal_remote.go @@ -3,12 +3,11 @@ package remote import ( "fmt" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/rubyserver" "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" - "gitlab.com/gitlab-org/gitaly/internal/rubyserver" ) // FetchInternalRemote fetches another Gitaly repository set as a remote diff --git a/internal/service/remote/fetch_internal_remote_test.go b/internal/service/remote/fetch_internal_remote_test.go index a49e4cd2f..22bfab29c 100644 --- a/internal/service/remote/fetch_internal_remote_test.go +++ b/internal/service/remote/fetch_internal_remote_test.go @@ -5,17 +5,14 @@ import ( "net" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + serverPkg "gitlab.com/gitlab-org/gitaly/internal/server" "gitlab.com/gitlab-org/gitaly/internal/service/remote" - + "gitlab.com/gitlab-org/gitaly/internal/testhelper" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" - - "github.com/stretchr/testify/require" - serverPkg "gitlab.com/gitlab-org/gitaly/internal/server" - - "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) func TestSuccessfulFetchInternalRemote(t *testing.T) { diff --git a/internal/service/remote/find_remote_root_ref.go b/internal/service/remote/find_remote_root_ref.go index aac0527f2..56602be8d 100644 --- a/internal/service/remote/find_remote_root_ref.go +++ b/internal/service/remote/find_remote_root_ref.go @@ -4,12 +4,11 @@ import ( "bufio" "strings" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/git" "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" - "gitlab.com/gitlab-org/gitaly/internal/git" ) const headPrefix = "HEAD branch: " diff --git a/internal/service/remote/remotes.go b/internal/service/remote/remotes.go index ab0805530..45fda5caa 100644 --- a/internal/service/remote/remotes.go +++ b/internal/service/remote/remotes.go @@ -6,14 +6,12 @@ import ( "io/ioutil" "strings" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "golang.org/x/net/context" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" + "golang.org/x/net/context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) // AddRemote adds a remote to the repository diff --git a/internal/service/remote/remotes_test.go b/internal/service/remote/remotes_test.go index 68e96ef82..b38f9398e 100644 --- a/internal/service/remote/remotes_test.go +++ b/internal/service/remote/remotes_test.go @@ -8,14 +8,11 @@ import ( "net/http/httptest" "testing" - "google.golang.org/grpc/codes" - "github.com/stretchr/testify/require" - - "golang.org/x/net/context" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" + "golang.org/x/net/context" + "google.golang.org/grpc/codes" ) func TestSuccessfulAddRemote(t *testing.T) { diff --git a/internal/service/repository/apply_gitattributes_test.go b/internal/service/repository/apply_gitattributes_test.go index 16fdfa703..c51889d92 100644 --- a/internal/service/repository/apply_gitattributes_test.go +++ b/internal/service/repository/apply_gitattributes_test.go @@ -7,11 +7,10 @@ import ( "path" "testing" - "google.golang.org/grpc/codes" - "github.com/stretchr/testify/assert" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" + "google.golang.org/grpc/codes" ) func TestApplyGitattributesSuccess(t *testing.T) { diff --git a/internal/service/repository/archive.go b/internal/service/repository/archive.go index 50918848a..0b871226b 100644 --- a/internal/service/repository/archive.go +++ b/internal/service/repository/archive.go @@ -5,14 +5,12 @@ import ( "io" "os/exec" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/command" - "gitlab.com/gitlab-org/gitaly/streamio" - "gitlab.com/gitlab-org/gitaly/internal/git" + "gitlab.com/gitlab-org/gitaly/streamio" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) func parseArchiveFormat(format gitalypb.GetArchiveRequest_Format) (*exec.Cmd, string) { diff --git a/internal/service/repository/archive_test.go b/internal/service/repository/archive_test.go index f4d573de3..e0ba5ff9e 100644 --- a/internal/service/repository/archive_test.go +++ b/internal/service/repository/archive_test.go @@ -6,13 +6,11 @@ import ( "os" "testing" - "google.golang.org/grpc/codes" - "github.com/stretchr/testify/require" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "gitlab.com/gitlab-org/gitaly/streamio" + "google.golang.org/grpc/codes" ) func TestGetArchiveSuccess(t *testing.T) { diff --git a/internal/service/repository/backup_custom_hooks_test.go b/internal/service/repository/backup_custom_hooks_test.go index 2e2b6677f..33816b823 100644 --- a/internal/service/repository/backup_custom_hooks_test.go +++ b/internal/service/repository/backup_custom_hooks_test.go @@ -10,12 +10,11 @@ import ( "path" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "gitlab.com/gitlab-org/gitaly/streamio" - - "github.com/stretchr/testify/require" ) func TestSuccessfullBackupCustomHooksRequest(t *testing.T) { diff --git a/internal/service/repository/calculate_checksum.go b/internal/service/repository/calculate_checksum.go index 4bb3f2ad7..b8a88cb24 100644 --- a/internal/service/repository/calculate_checksum.go +++ b/internal/service/repository/calculate_checksum.go @@ -15,7 +15,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/git/alternates" "gitlab.com/gitlab-org/gitaly/internal/helper" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/service/repository/cleanup.go b/internal/service/repository/cleanup.go index 03cd50f6c..99fd9d343 100644 --- a/internal/service/repository/cleanup.go +++ b/internal/service/repository/cleanup.go @@ -7,12 +7,11 @@ import ( "strings" "time" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/helper" "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" - "gitlab.com/gitlab-org/gitaly/internal/helper" ) var lockFiles = []string{"config.lock", "HEAD.lock"} diff --git a/internal/service/repository/config.go b/internal/service/repository/config.go index 7f2db6610..30314f432 100644 --- a/internal/service/repository/config.go +++ b/internal/service/repository/config.go @@ -5,7 +5,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/command" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/service/repository/create.go b/internal/service/repository/create.go index 4831cf09b..58928b166 100644 --- a/internal/service/repository/create.go +++ b/internal/service/repository/create.go @@ -3,7 +3,6 @@ package repository import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "golang.org/x/net/context" ) diff --git a/internal/service/repository/create_bundle.go b/internal/service/repository/create_bundle.go index 94458abb4..ee1fed758 100644 --- a/internal/service/repository/create_bundle.go +++ b/internal/service/repository/create_bundle.go @@ -6,7 +6,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/streamio" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/repository/create_bundle_test.go b/internal/service/repository/create_bundle_test.go index 6fbe85b85..b0582c14e 100644 --- a/internal/service/repository/create_bundle_test.go +++ b/internal/service/repository/create_bundle_test.go @@ -6,12 +6,11 @@ import ( "os" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/tempdir" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "gitlab.com/gitlab-org/gitaly/streamio" - - "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" ) diff --git a/internal/service/repository/create_from_bundle.go b/internal/service/repository/create_from_bundle.go index 8703c6416..9ac287933 100644 --- a/internal/service/repository/create_from_bundle.go +++ b/internal/service/repository/create_from_bundle.go @@ -13,7 +13,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/tempdir" "gitlab.com/gitlab-org/gitaly/streamio" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/repository/create_from_bundle_test.go b/internal/service/repository/create_from_bundle_test.go index 50b00c86d..7c8a2f3c4 100644 --- a/internal/service/repository/create_from_bundle_test.go +++ b/internal/service/repository/create_from_bundle_test.go @@ -6,15 +6,14 @@ import ( "path" "testing" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git/log" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/tempdir" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "gitlab.com/gitlab-org/gitaly/streamio" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" ) diff --git a/internal/service/repository/create_from_snapshot.go b/internal/service/repository/create_from_snapshot.go index fd539c0bc..4d02bb1d0 100644 --- a/internal/service/repository/create_from_snapshot.go +++ b/internal/service/repository/create_from_snapshot.go @@ -7,14 +7,13 @@ import ( "os/exec" "time" - "golang.org/x/net/context" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/command" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/tempdir" + "golang.org/x/net/context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) // httpTransport defines a http.Transport with values that are more restrictive diff --git a/internal/service/repository/create_from_snapshot_test.go b/internal/service/repository/create_from_snapshot_test.go index 1f1654e2c..a308e0e9f 100644 --- a/internal/service/repository/create_from_snapshot_test.go +++ b/internal/service/repository/create_from_snapshot_test.go @@ -11,11 +11,10 @@ import ( "testing" "github.com/stretchr/testify/require" - "google.golang.org/grpc/codes" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/archive" "gitlab.com/gitlab-org/gitaly/internal/testhelper" + "google.golang.org/grpc/codes" ) var ( diff --git a/internal/service/repository/create_from_url.go b/internal/service/repository/create_from_url.go index 75eb01467..3e4ef6cfb 100644 --- a/internal/service/repository/create_from_url.go +++ b/internal/service/repository/create_from_url.go @@ -8,7 +8,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/command" "gitlab.com/gitlab-org/gitaly/internal/helper" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/service/repository/create_from_url_test.go b/internal/service/repository/create_from_url_test.go index 7c780f51e..c50aec953 100644 --- a/internal/service/repository/create_from_url_test.go +++ b/internal/service/repository/create_from_url_test.go @@ -6,11 +6,10 @@ import ( "path" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" ) diff --git a/internal/service/repository/create_test.go b/internal/service/repository/create_test.go index 724005003..7a36c40f7 100644 --- a/internal/service/repository/create_test.go +++ b/internal/service/repository/create_test.go @@ -6,12 +6,11 @@ import ( "path" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/config" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" ) diff --git a/internal/service/repository/fetch.go b/internal/service/repository/fetch.go index 9b0cca68c..f09488893 100644 --- a/internal/service/repository/fetch.go +++ b/internal/service/repository/fetch.go @@ -3,7 +3,6 @@ package repository import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "golang.org/x/net/context" ) diff --git a/internal/service/repository/fetch_remote.go b/internal/service/repository/fetch_remote.go index 6527735a2..e6dfd9de1 100644 --- a/internal/service/repository/fetch_remote.go +++ b/internal/service/repository/fetch_remote.go @@ -3,10 +3,9 @@ package repository import ( "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" log "github.com/sirupsen/logrus" - "golang.org/x/net/context" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" + "golang.org/x/net/context" ) func (s *server) FetchRemote(ctx context.Context, in *gitalypb.FetchRemoteRequest) (*gitalypb.FetchRemoteResponse, error) { diff --git a/internal/service/repository/fetch_remote_test.go b/internal/service/repository/fetch_remote_test.go index d1ca628c4..2a8ee4f1b 100644 --- a/internal/service/repository/fetch_remote_test.go +++ b/internal/service/repository/fetch_remote_test.go @@ -5,14 +5,12 @@ import ( "path" "testing" - "google.golang.org/grpc/codes" - + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" ) func copyRepoWithNewRemote(t *testing.T, repo *gitalypb.Repository, remote string) *gitalypb.Repository { diff --git a/internal/service/repository/fetch_test.go b/internal/service/repository/fetch_test.go index 3515d511f..a20160ad0 100644 --- a/internal/service/repository/fetch_test.go +++ b/internal/service/repository/fetch_test.go @@ -6,14 +6,13 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" gitLog "gitlab.com/gitlab-org/gitaly/internal/git/log" "gitlab.com/gitlab-org/gitaly/internal/helper" serverPkg "gitlab.com/gitlab-org/gitaly/internal/server" "gitlab.com/gitlab-org/gitaly/internal/service/repository" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "google.golang.org/grpc" "google.golang.org/grpc/codes" healthpb "google.golang.org/grpc/health/grpc_health_v1" diff --git a/internal/service/repository/fork.go b/internal/service/repository/fork.go index 8e75ddb0e..9e50c69dd 100644 --- a/internal/service/repository/fork.go +++ b/internal/service/repository/fork.go @@ -11,7 +11,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/command" "gitlab.com/gitlab-org/gitaly/internal/config" "gitlab.com/gitlab-org/gitaly/internal/helper" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/service/repository/fork_test.go b/internal/service/repository/fork_test.go index fe1eac701..813f0edff 100644 --- a/internal/service/repository/fork_test.go +++ b/internal/service/repository/fork_test.go @@ -6,12 +6,11 @@ import ( "path" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/service/repository" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" ) diff --git a/internal/service/repository/fsck.go b/internal/service/repository/fsck.go index 3f2886802..d6ccb86ca 100644 --- a/internal/service/repository/fsck.go +++ b/internal/service/repository/fsck.go @@ -7,7 +7,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/command" "gitlab.com/gitlab-org/gitaly/internal/git/alternates" - "golang.org/x/net/context" ) diff --git a/internal/service/repository/gc.go b/internal/service/repository/gc.go index b1a1914f8..b6ac14e17 100644 --- a/internal/service/repository/gc.go +++ b/internal/service/repository/gc.go @@ -4,13 +4,12 @@ import ( "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" log "github.com/sirupsen/logrus" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/git" + "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/helper/housekeeping" "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - - "gitlab.com/gitlab-org/gitaly/internal/git" - "gitlab.com/gitlab-org/gitaly/internal/helper" ) func (server) GarbageCollect(ctx context.Context, in *gitalypb.GarbageCollectRequest) (*gitalypb.GarbageCollectResponse, error) { diff --git a/internal/service/repository/gc_test.go b/internal/service/repository/gc_test.go index 416bf3a01..d718c3229 100644 --- a/internal/service/repository/gc_test.go +++ b/internal/service/repository/gc_test.go @@ -10,12 +10,11 @@ import ( "testing" "time" - "google.golang.org/grpc/codes" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" + "google.golang.org/grpc/codes" ) var ( diff --git a/internal/service/repository/info_attributes.go b/internal/service/repository/info_attributes.go index ea6c7f624..bbd423652 100644 --- a/internal/service/repository/info_attributes.go +++ b/internal/service/repository/info_attributes.go @@ -8,7 +8,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/streamio" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/repository/license.go b/internal/service/repository/license.go index 9997d4e64..584cdba6b 100644 --- a/internal/service/repository/license.go +++ b/internal/service/repository/license.go @@ -1,10 +1,9 @@ package repository import ( - "golang.org/x/net/context" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" + "golang.org/x/net/context" ) func (s *server) FindLicense(ctx context.Context, in *gitalypb.FindLicenseRequest) (*gitalypb.FindLicenseResponse, error) { diff --git a/internal/service/repository/license_test.go b/internal/service/repository/license_test.go index fe016f7a6..71f071de0 100644 --- a/internal/service/repository/license_test.go +++ b/internal/service/repository/license_test.go @@ -4,11 +4,10 @@ import ( "os" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" ) func TestSuccessfulFindLicenseRequest(t *testing.T) { diff --git a/internal/service/repository/merge_base.go b/internal/service/repository/merge_base.go index d180c857d..192a00c7c 100644 --- a/internal/service/repository/merge_base.go +++ b/internal/service/repository/merge_base.go @@ -6,7 +6,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/service/repository/merge_base_test.go b/internal/service/repository/merge_base_test.go index 681cc895c..8e99e9310 100644 --- a/internal/service/repository/merge_base_test.go +++ b/internal/service/repository/merge_base_test.go @@ -3,10 +3,9 @@ package repository import ( "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" ) diff --git a/internal/service/repository/raw_changes.go b/internal/service/repository/raw_changes.go index 7495f8bda..29fdc1743 100644 --- a/internal/service/repository/raw_changes.go +++ b/internal/service/repository/raw_changes.go @@ -3,7 +3,6 @@ package repository import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/repository/rebase_in_progress.go b/internal/service/repository/rebase_in_progress.go index 3ba5eb511..2fff4d7f6 100644 --- a/internal/service/repository/rebase_in_progress.go +++ b/internal/service/repository/rebase_in_progress.go @@ -10,7 +10,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/helper/housekeeping" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/service/repository/rebase_in_progress_test.go b/internal/service/repository/rebase_in_progress_test.go index 30501ee80..44d1bbe61 100644 --- a/internal/service/repository/rebase_in_progress_test.go +++ b/internal/service/repository/rebase_in_progress_test.go @@ -7,10 +7,9 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" ) diff --git a/internal/service/repository/repack.go b/internal/service/repository/repack.go index 9a5fca46f..3f031c0be 100644 --- a/internal/service/repository/repack.go +++ b/internal/service/repository/repack.go @@ -3,12 +3,11 @@ package repository import ( "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" log "github.com/sirupsen/logrus" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/git" "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" - "gitlab.com/gitlab-org/gitaly/internal/git" ) func (server) RepackFull(ctx context.Context, in *gitalypb.RepackFullRequest) (*gitalypb.RepackFullResponse, error) { diff --git a/internal/service/repository/repack_test.go b/internal/service/repository/repack_test.go index f7053d912..b825aa6e6 100644 --- a/internal/service/repository/repack_test.go +++ b/internal/service/repository/repack_test.go @@ -7,11 +7,10 @@ import ( "testing" "time" - "google.golang.org/grpc/codes" - "github.com/stretchr/testify/assert" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" + "google.golang.org/grpc/codes" ) func TestRepackIncrementalSuccess(t *testing.T) { diff --git a/internal/service/repository/repository.go b/internal/service/repository/repository.go index 38ac363e2..2fb780f5d 100644 --- a/internal/service/repository/repository.go +++ b/internal/service/repository/repository.go @@ -3,13 +3,12 @@ package repository import ( "io/ioutil" - "golang.org/x/net/context" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/helper" + "golang.org/x/net/context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) // Deprecated diff --git a/internal/service/repository/repository_test.go b/internal/service/repository/repository_test.go index dfc3e2cc7..7d4998299 100644 --- a/internal/service/repository/repository_test.go +++ b/internal/service/repository/repository_test.go @@ -6,12 +6,11 @@ import ( "path" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/config" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/repository/restore_custom_hooks_test.go b/internal/service/repository/restore_custom_hooks_test.go index 238ca72db..7b91c99b3 100644 --- a/internal/service/repository/restore_custom_hooks_test.go +++ b/internal/service/repository/restore_custom_hooks_test.go @@ -6,13 +6,12 @@ import ( "path" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "gitlab.com/gitlab-org/gitaly/streamio" "google.golang.org/grpc/codes" - - "github.com/stretchr/testify/require" ) func TestSuccessfullRestoreCustomHooksRequest(t *testing.T) { diff --git a/internal/service/repository/search_files.go b/internal/service/repository/search_files.go index def8fa702..d48b2bb0e 100644 --- a/internal/service/repository/search_files.go +++ b/internal/service/repository/search_files.go @@ -4,13 +4,12 @@ import ( "bytes" "errors" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/helper/lines" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) const surroundContext = "2" diff --git a/internal/service/repository/size.go b/internal/service/repository/size.go index 24c272ff9..e8c55c0b8 100644 --- a/internal/service/repository/size.go +++ b/internal/service/repository/size.go @@ -7,11 +7,10 @@ import ( "os/exec" "strconv" + "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/command" "gitlab.com/gitlab-org/gitaly/internal/helper" - - "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" "golang.org/x/net/context" ) diff --git a/internal/service/repository/size_test.go b/internal/service/repository/size_test.go index 74d79b21c..6dc9a37b3 100644 --- a/internal/service/repository/size_test.go +++ b/internal/service/repository/size_test.go @@ -5,11 +5,10 @@ import ( "path" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/config" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/repository/snapshot.go b/internal/service/repository/snapshot.go index 7197efee7..9c829b402 100644 --- a/internal/service/repository/snapshot.go +++ b/internal/service/repository/snapshot.go @@ -3,13 +3,12 @@ package repository import ( "regexp" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/archive" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/streamio" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) var objectFiles = []*regexp.Regexp{ diff --git a/internal/service/repository/snapshot_test.go b/internal/service/repository/snapshot_test.go index 16c41331d..d60516a0b 100644 --- a/internal/service/repository/snapshot_test.go +++ b/internal/service/repository/snapshot_test.go @@ -11,12 +11,11 @@ import ( "testing" "github.com/stretchr/testify/require" - "google.golang.org/grpc/codes" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/archive" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "gitlab.com/gitlab-org/gitaly/streamio" + "google.golang.org/grpc/codes" ) func getSnapshot(t *testing.T, req *gitalypb.GetSnapshotRequest) ([]byte, error) { diff --git a/internal/service/repository/squash_in_progress.go b/internal/service/repository/squash_in_progress.go index 71f62fdd7..81b6441fd 100644 --- a/internal/service/repository/squash_in_progress.go +++ b/internal/service/repository/squash_in_progress.go @@ -6,7 +6,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/helper" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/service/repository/squash_in_progress_test.go b/internal/service/repository/squash_in_progress_test.go index dc8c36194..2e262130c 100644 --- a/internal/service/repository/squash_in_progress_test.go +++ b/internal/service/repository/squash_in_progress_test.go @@ -4,10 +4,9 @@ import ( "path" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" ) diff --git a/internal/service/repository/testhelper_test.go b/internal/service/repository/testhelper_test.go index 89a64530c..20a8b6ef5 100644 --- a/internal/service/repository/testhelper_test.go +++ b/internal/service/repository/testhelper_test.go @@ -8,14 +8,13 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" gitalyauth "gitlab.com/gitlab-org/gitaly/auth" "gitlab.com/gitlab-org/gitaly/internal/config" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" "gitlab.com/gitlab-org/gitaly/internal/server/auth" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/assert" "google.golang.org/grpc" "google.golang.org/grpc/reflection" ) diff --git a/internal/service/repository/util.go b/internal/service/repository/util.go index 248163bda..f859358fc 100644 --- a/internal/service/repository/util.go +++ b/internal/service/repository/util.go @@ -5,7 +5,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git" - "golang.org/x/net/context" ) diff --git a/internal/service/repository/write_config.go b/internal/service/repository/write_config.go index 0e89e0949..0a6b3d279 100644 --- a/internal/service/repository/write_config.go +++ b/internal/service/repository/write_config.go @@ -1,10 +1,9 @@ package repository import ( - "golang.org/x/net/context" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" + "golang.org/x/net/context" ) func (s *server) WriteConfig(ctx context.Context, req *gitalypb.WriteConfigRequest) (*gitalypb.WriteConfigResponse, error) { diff --git a/internal/service/repository/write_ref.go b/internal/service/repository/write_ref.go index afc3c477d..a70c15490 100644 --- a/internal/service/repository/write_ref.go +++ b/internal/service/repository/write_ref.go @@ -7,10 +7,9 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" + "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - - "golang.org/x/net/context" ) func (s *server) WriteRef(ctx context.Context, req *gitalypb.WriteRefRequest) (*gitalypb.WriteRefResponse, error) { diff --git a/internal/service/server/info.go b/internal/service/server/info.go index b46ad12d1..323014ab3 100644 --- a/internal/service/server/info.go +++ b/internal/service/server/info.go @@ -9,7 +9,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/config" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/version" - "golang.org/x/net/context" ) diff --git a/internal/service/server/info_test.go b/internal/service/server/info_test.go index 4e1f016a5..5f10b0774 100644 --- a/internal/service/server/info_test.go +++ b/internal/service/server/info_test.go @@ -5,6 +5,7 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" gitalyauth "gitlab.com/gitlab-org/gitaly/auth" "gitlab.com/gitlab-org/gitaly/internal/config" @@ -12,8 +13,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/server/auth" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "gitlab.com/gitlab-org/gitaly/internal/version" - - "github.com/stretchr/testify/require" "google.golang.org/grpc" "google.golang.org/grpc/reflection" ) diff --git a/internal/service/smarthttp/inforefs.go b/internal/service/smarthttp/inforefs.go index 59e115d09..7ebfd7b96 100644 --- a/internal/service/smarthttp/inforefs.go +++ b/internal/service/smarthttp/inforefs.go @@ -14,7 +14,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/git/pktline" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/streamio" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/smarthttp/inforefs_test.go b/internal/service/smarthttp/inforefs_test.go index 50777fc29..e2ed888d4 100644 --- a/internal/service/smarthttp/inforefs_test.go +++ b/internal/service/smarthttp/inforefs_test.go @@ -7,13 +7,12 @@ import ( "strings" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/config" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "gitlab.com/gitlab-org/gitaly/streamio" - - "github.com/stretchr/testify/require" "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/smarthttp/receive_pack.go b/internal/service/smarthttp/receive_pack.go index 7bde1fe9d..74d7b0964 100644 --- a/internal/service/smarthttp/receive_pack.go +++ b/internal/service/smarthttp/receive_pack.go @@ -10,7 +10,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/command" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/helper" - "gitlab.com/gitlab-org/gitaly/streamio" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/service/smarthttp/receive_pack_test.go b/internal/service/smarthttp/receive_pack_test.go index c4b48a9f7..dc6ffbbf5 100644 --- a/internal/service/smarthttp/receive_pack_test.go +++ b/internal/service/smarthttp/receive_pack_test.go @@ -10,14 +10,12 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/config" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "gitlab.com/gitlab-org/gitaly/streamio" - - "github.com/stretchr/testify/require" "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/smarthttp/testhelper_test.go b/internal/service/smarthttp/testhelper_test.go index 70f0dd08d..ee2642b2e 100644 --- a/internal/service/smarthttp/testhelper_test.go +++ b/internal/service/smarthttp/testhelper_test.go @@ -7,7 +7,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "google.golang.org/grpc" "google.golang.org/grpc/reflection" ) diff --git a/internal/service/smarthttp/upload_pack.go b/internal/service/smarthttp/upload_pack.go index 01f74efc7..0718df24d 100644 --- a/internal/service/smarthttp/upload_pack.go +++ b/internal/service/smarthttp/upload_pack.go @@ -4,15 +4,12 @@ import ( "io" "os/exec" - "gitlab.com/gitlab-org/gitaly/internal/git" - + "github.com/prometheus/client_golang/prometheus" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/command" + "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/helper" - "gitlab.com/gitlab-org/gitaly/streamio" - - "github.com/prometheus/client_golang/prometheus" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/smarthttp/upload_pack_test.go b/internal/service/smarthttp/upload_pack_test.go index d2cb3a957..3c44fcd45 100644 --- a/internal/service/smarthttp/upload_pack_test.go +++ b/internal/service/smarthttp/upload_pack_test.go @@ -11,18 +11,15 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" - "gitlab.com/gitlab-org/gitaly/internal/git" - "gitlab.com/gitlab-org/gitaly/internal/config" + "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/git/pktline" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "gitlab.com/gitlab-org/gitaly/streamio" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/ssh/receive_pack.go b/internal/service/ssh/receive_pack.go index c49265a32..a54bc0ca3 100644 --- a/internal/service/ssh/receive_pack.go +++ b/internal/service/ssh/receive_pack.go @@ -10,7 +10,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/command" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/helper" - "gitlab.com/gitlab-org/gitaly/streamio" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/service/ssh/receive_pack_test.go b/internal/service/ssh/receive_pack_test.go index 95753ae14..37531c853 100644 --- a/internal/service/ssh/receive_pack_test.go +++ b/internal/service/ssh/receive_pack_test.go @@ -10,15 +10,12 @@ import ( "testing" "time" - "gitlab.com/gitlab-org/gitaly/internal/config" - "github.com/golang/protobuf/jsonpb" "github.com/stretchr/testify/require" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/config" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/ssh/testhelper_test.go b/internal/service/ssh/testhelper_test.go index 94d7f489b..68ced139c 100644 --- a/internal/service/ssh/testhelper_test.go +++ b/internal/service/ssh/testhelper_test.go @@ -8,7 +8,6 @@ import ( "time" log "github.com/sirupsen/logrus" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "google.golang.org/grpc" diff --git a/internal/service/ssh/upload_archive_test.go b/internal/service/ssh/upload_archive_test.go index d8680d461..c639c003b 100644 --- a/internal/service/ssh/upload_archive_test.go +++ b/internal/service/ssh/upload_archive_test.go @@ -8,10 +8,8 @@ import ( "github.com/golang/protobuf/jsonpb" "github.com/stretchr/testify/require" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/ssh/upload_pack.go b/internal/service/ssh/upload_pack.go index 61d0fe618..a06b3caae 100644 --- a/internal/service/ssh/upload_pack.go +++ b/internal/service/ssh/upload_pack.go @@ -3,10 +3,9 @@ package ssh import ( "os/exec" - "gitlab.com/gitlab-org/gitaly/internal/git" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/command" + "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/streamio" "google.golang.org/grpc/codes" diff --git a/internal/service/ssh/upload_pack_test.go b/internal/service/ssh/upload_pack_test.go index 843b766bd..d62734e2f 100644 --- a/internal/service/ssh/upload_pack_test.go +++ b/internal/service/ssh/upload_pack_test.go @@ -9,16 +9,12 @@ import ( "strings" "testing" - "gitlab.com/gitlab-org/gitaly/internal/git" - - "gitlab.com/gitlab-org/gitaly/internal/config" - "github.com/golang/protobuf/jsonpb" "github.com/stretchr/testify/require" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/config" + "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/storage/testhelper_test.go b/internal/service/storage/testhelper_test.go index 3dc5607b9..aeb405ca6 100644 --- a/internal/service/storage/testhelper_test.go +++ b/internal/service/storage/testhelper_test.go @@ -10,7 +10,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/config" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "google.golang.org/grpc" "google.golang.org/grpc/reflection" ) diff --git a/internal/service/wiki/delete_page.go b/internal/service/wiki/delete_page.go index aa4559a75..cd1ecbaff 100644 --- a/internal/service/wiki/delete_page.go +++ b/internal/service/wiki/delete_page.go @@ -5,7 +5,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/service/wiki/delete_page_test.go b/internal/service/wiki/delete_page_test.go index 34b7cc276..85e8879bb 100644 --- a/internal/service/wiki/delete_page_test.go +++ b/internal/service/wiki/delete_page_test.go @@ -3,11 +3,10 @@ package wiki import ( "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" gitlog "gitlab.com/gitlab-org/gitaly/internal/git/log" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" ) diff --git a/internal/service/wiki/find_file.go b/internal/service/wiki/find_file.go index 29f339944..c05598c92 100644 --- a/internal/service/wiki/find_file.go +++ b/internal/service/wiki/find_file.go @@ -3,7 +3,6 @@ package wiki import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/wiki/find_file_test.go b/internal/service/wiki/find_file_test.go index 336a69583..72dd58676 100644 --- a/internal/service/wiki/find_file_test.go +++ b/internal/service/wiki/find_file_test.go @@ -8,10 +8,9 @@ import ( "path" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" ) diff --git a/internal/service/wiki/find_page.go b/internal/service/wiki/find_page.go index dd8518039..290e92ce5 100644 --- a/internal/service/wiki/find_page.go +++ b/internal/service/wiki/find_page.go @@ -3,7 +3,6 @@ package wiki import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/wiki/find_page_test.go b/internal/service/wiki/find_page_test.go index 254465f41..e0c23cbb4 100644 --- a/internal/service/wiki/find_page_test.go +++ b/internal/service/wiki/find_page_test.go @@ -4,10 +4,9 @@ import ( "io" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" ) diff --git a/internal/service/wiki/formatted_data.go b/internal/service/wiki/formatted_data.go index 03677949d..12b2f11f6 100644 --- a/internal/service/wiki/formatted_data.go +++ b/internal/service/wiki/formatted_data.go @@ -3,7 +3,6 @@ package wiki import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/wiki/formatted_data_test.go b/internal/service/wiki/formatted_data_test.go index 587220bdf..2047fe261 100644 --- a/internal/service/wiki/formatted_data_test.go +++ b/internal/service/wiki/formatted_data_test.go @@ -5,10 +5,9 @@ import ( "io" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" ) diff --git a/internal/service/wiki/get_all_pages_test.go b/internal/service/wiki/get_all_pages_test.go index 9aaced04e..5162b530c 100644 --- a/internal/service/wiki/get_all_pages_test.go +++ b/internal/service/wiki/get_all_pages_test.go @@ -4,12 +4,10 @@ import ( "io" "testing" - "google.golang.org/grpc/codes" - "github.com/stretchr/testify/require" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" + "google.golang.org/grpc/codes" ) func TestSuccessfulWikiGetAllPagesRequest(t *testing.T) { diff --git a/internal/service/wiki/get_page_versions.go b/internal/service/wiki/get_page_versions.go index d0bf36860..2925c6f07 100644 --- a/internal/service/wiki/get_page_versions.go +++ b/internal/service/wiki/get_page_versions.go @@ -3,7 +3,6 @@ package wiki import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/wiki/get_page_versions_test.go b/internal/service/wiki/get_page_versions_test.go index fa3ce9084..aafdf6e69 100644 --- a/internal/service/wiki/get_page_versions_test.go +++ b/internal/service/wiki/get_page_versions_test.go @@ -6,11 +6,10 @@ import ( "strings" "testing" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" - "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) func TestWikiGetPageVersionsRequest(t *testing.T) { diff --git a/internal/service/wiki/testhelper_test.go b/internal/service/wiki/testhelper_test.go index 29c6410b9..c67da5609 100644 --- a/internal/service/wiki/testhelper_test.go +++ b/internal/service/wiki/testhelper_test.go @@ -9,14 +9,13 @@ import ( "testing" "time" + log "github.com/sirupsen/logrus" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" gitlog "gitlab.com/gitlab-org/gitaly/internal/git/log" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - log "github.com/sirupsen/logrus" - "github.com/stretchr/testify/require" "google.golang.org/grpc" "google.golang.org/grpc/reflection" ) diff --git a/internal/service/wiki/update_page.go b/internal/service/wiki/update_page.go index f6db8209e..5c665a1bb 100644 --- a/internal/service/wiki/update_page.go +++ b/internal/service/wiki/update_page.go @@ -5,7 +5,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/wiki/update_page_test.go b/internal/service/wiki/update_page_test.go index 2c14bc6ab..696b7d84e 100644 --- a/internal/service/wiki/update_page_test.go +++ b/internal/service/wiki/update_page_test.go @@ -4,11 +4,10 @@ import ( "bytes" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" gitlog "gitlab.com/gitlab-org/gitaly/internal/git/log" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" ) diff --git a/internal/service/wiki/write_page.go b/internal/service/wiki/write_page.go index ee2f38a9d..635fd8033 100644 --- a/internal/service/wiki/write_page.go +++ b/internal/service/wiki/write_page.go @@ -5,7 +5,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/wiki/write_page_test.go b/internal/service/wiki/write_page_test.go index a63711397..04620d612 100644 --- a/internal/service/wiki/write_page_test.go +++ b/internal/service/wiki/write_page_test.go @@ -4,11 +4,10 @@ import ( "bytes" "testing" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" gitlog "gitlab.com/gitlab-org/gitaly/internal/git/log" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" ) diff --git a/internal/supervisor/supervisor_test.go b/internal/supervisor/supervisor_test.go index 33e7cb17c..c56e5fb3e 100644 --- a/internal/supervisor/supervisor_test.go +++ b/internal/supervisor/supervisor_test.go @@ -14,9 +14,8 @@ import ( "testing" "time" - "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "github.com/stretchr/testify/require" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) var ( diff --git a/internal/tempdir/tempdir.go b/internal/tempdir/tempdir.go index 365c93d40..faa0bc0b0 100644 --- a/internal/tempdir/tempdir.go +++ b/internal/tempdir/tempdir.go @@ -9,12 +9,11 @@ import ( "strings" "time" + log "github.com/sirupsen/logrus" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/config" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/helper/housekeeping" - - log "github.com/sirupsen/logrus" ) const ( diff --git a/internal/tempdir/tempdir_test.go b/internal/tempdir/tempdir_test.go index 72efae7ad..ef09b7e25 100644 --- a/internal/tempdir/tempdir_test.go +++ b/internal/tempdir/tempdir_test.go @@ -7,11 +7,10 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - - "github.com/stretchr/testify/require" ) func TestNewAsRepositorySuccess(t *testing.T) { diff --git a/internal/testhelper/testhelper.go b/internal/testhelper/testhelper.go index 3770519e8..7c5b0ebc8 100644 --- a/internal/testhelper/testhelper.go +++ b/internal/testhelper/testhelper.go @@ -18,18 +18,15 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" - + "github.com/grpc-ecosystem/go-grpc-middleware" + "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" log "github.com/sirupsen/logrus" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/command" "gitlab.com/gitlab-org/gitaly/internal/config" "gitlab.com/gitlab-org/gitaly/internal/storage" - - "github.com/grpc-ecosystem/go-grpc-middleware" - "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" |