From 9586df22c2161e04a44360dfa00c1b8308099fc0 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Thu, 18 Oct 2018 18:36:20 +0200 Subject: [PATCH] Group local go imports separately --- _support/makegen.go | 11 +++++++---- client/receive_pack.go | 5 +++-- client/upload_archive.go | 5 +++-- client/upload_pack.go | 5 +++-- cmd/gitaly-ssh/main.go | 3 ++- cmd/gitaly-ssh/receive_pack.go | 1 + cmd/gitaly-ssh/upload_archive.go | 1 + cmd/gitaly-ssh/upload_pack.go | 1 + cmd/gitaly/main.go | 1 + internal/command/command.go | 1 + internal/config/prometheus.go | 1 + internal/config/sentry.go | 1 + internal/git/catfile/batch.go | 3 ++- internal/git/catfile/batchcheck.go | 3 ++- internal/git/catfile/catfile_test.go | 1 + internal/git/log/commit.go | 1 + internal/git/log/commit_test.go | 1 + internal/git/log/last_commit.go | 1 + internal/helper/repo.go | 5 +++-- internal/helper/repo_test.go | 3 ++- internal/helper/storage.go | 3 ++- internal/helper/storage_test.go | 3 ++- internal/linguist/linguist_test.go | 1 + internal/middleware/limithandler/limithandler_test.go | 5 +++-- internal/middleware/limithandler/testhelper_test.go | 3 ++- .../middleware/metadatahandler/metadatahandler.go | 5 +++-- internal/middleware/sentryhandler/sentryhandler.go | 3 ++- internal/rubyserver/concurrency_test.go | 5 +++-- internal/rubyserver/health_test.go | 1 + internal/rubyserver/proxy.go | 3 ++- internal/rubyserver/proxy_test.go | 3 ++- internal/rubyserver/rubyserver.go | 5 +++-- internal/rubyserver/rubyserver_test.go | 3 ++- internal/rubyserver/worker.go | 1 + internal/rubyserver/worker_test.go | 1 + internal/server/auth/auth.go | 5 +++-- internal/server/auth_test.go | 7 ++++--- internal/server/server.go | 7 ++++--- internal/service/blob/get_blob.go | 5 +++-- internal/service/blob/get_blob_test.go | 1 + internal/service/blob/get_blobs.go | 5 +++-- internal/service/blob/get_blobs_test.go | 3 ++- internal/service/blob/lfs_pointers.go | 5 +++-- internal/service/blob/lfs_pointers_test.go | 3 ++- internal/service/blob/testhelper_test.go | 5 +++-- internal/service/commit/between.go | 5 +++-- internal/service/commit/between_test.go | 5 +++-- internal/service/commit/commit_messages.go | 5 +++-- internal/service/commit/commit_messages_test.go | 3 ++- internal/service/commit/commit_signatures.go | 5 +++-- internal/service/commit/commit_signatures_test.go | 3 ++- internal/service/commit/commits_by_message.go | 3 ++- internal/service/commit/commits_by_message_test.go | 5 +++-- internal/service/commit/commits_helper.go | 1 + internal/service/commit/count_commits.go | 5 +++-- internal/service/commit/count_commits_test.go | 5 +++-- internal/service/commit/extractsignature_test.go | 5 +++-- .../service/commit/filter_shas_with_signatures.go | 5 +++-- .../commit/filter_shas_with_signatures_test.go | 3 ++- internal/service/commit/find_all_commits.go | 5 +++-- internal/service/commit/find_all_commits_test.go | 5 +++-- internal/service/commit/find_commit.go | 7 ++++--- internal/service/commit/find_commit_test.go | 9 +++++---- internal/service/commit/find_commits.go | 5 +++-- internal/service/commit/find_commits_test.go | 3 ++- internal/service/commit/isancestor.go | 5 +++-- internal/service/commit/isancestor_test.go | 5 +++-- internal/service/commit/languages.go | 7 ++++--- internal/service/commit/languages_test.go | 1 + internal/service/commit/last_commit_for_path.go | 5 +++-- internal/service/commit/last_commit_for_path_test.go | 5 +++-- internal/service/commit/list_commits_by_oid_test.go | 3 ++- internal/service/commit/list_files.go | 5 +++-- internal/service/commit/list_files_test.go | 5 +++-- internal/service/commit/list_last_commits_for_tree.go | 5 +++-- .../service/commit/list_last_commits_for_tree_test.go | 5 +++-- internal/service/commit/raw_blame.go | 5 +++-- internal/service/commit/raw_blame_test.go | 5 +++-- internal/service/commit/stats.go | 3 ++- internal/service/commit/stats_test.go | 3 ++- internal/service/commit/testhelper_test.go | 5 +++-- internal/service/commit/tree_entries.go | 5 +++-- internal/service/commit/tree_entries_test.go | 5 +++-- internal/service/commit/tree_entry.go | 5 +++-- internal/service/commit/tree_entry_test.go | 5 +++-- internal/service/conflicts/list_conflict_files.go | 5 +++-- .../service/conflicts/list_conflict_files_test.go | 3 ++- internal/service/conflicts/resolve_conflicts.go | 5 +++-- internal/service/conflicts/resolve_conflicts_test.go | 7 ++++--- internal/service/conflicts/testhelper_test.go | 5 +++-- internal/service/diff/commit.go | 5 +++-- internal/service/diff/commit_test.go | 5 +++-- internal/service/diff/numstat.go | 5 +++-- internal/service/diff/numstat_test.go | 5 +++-- internal/service/diff/patch_test.go | 1 + internal/service/diff/raw.go | 7 ++++--- internal/service/diff/raw_test.go | 3 ++- internal/service/diff/testhelper_test.go | 5 +++-- internal/service/namespace/namespace.go | 5 +++-- internal/service/namespace/namespace_test.go | 5 +++-- internal/service/namespace/testhelper_test.go | 5 +++-- internal/service/operations/branches.go | 5 +++-- internal/service/operations/branches_test.go | 5 +++-- internal/service/operations/cherry_pick.go | 5 +++-- internal/service/operations/cherry_pick_test.go | 7 ++++--- internal/service/operations/commit_files.go | 5 +++-- internal/service/operations/commit_files_test.go | 5 +++-- internal/service/operations/merge.go | 5 +++-- internal/service/operations/merge_test.go | 3 ++- internal/service/operations/rebase.go | 5 +++-- internal/service/operations/rebase_test.go | 5 +++-- internal/service/operations/revert.go | 5 +++-- internal/service/operations/revert_test.go | 5 +++-- internal/service/operations/squash.go | 5 +++-- internal/service/operations/squash_test.go | 3 ++- internal/service/operations/tags.go | 3 ++- internal/service/operations/tags_test.go | 3 ++- internal/service/operations/testhelper_test.go | 5 +++-- internal/service/operations/update_branches_test.go | 5 +++-- internal/service/ref/branches.go | 3 ++- internal/service/ref/branches_test.go | 3 ++- internal/service/ref/delete_refs.go | 5 +++-- internal/service/ref/delete_refs_test.go | 3 ++- internal/service/ref/list_new_blobs.go | 5 +++-- internal/service/ref/list_new_blobs_test.go | 5 +++-- internal/service/ref/list_new_commits.go | 5 +++-- internal/service/ref/list_new_commits_test.go | 5 +++-- internal/service/ref/refexists.go | 7 ++++--- internal/service/ref/refexists_test.go | 3 ++- internal/service/ref/refname.go | 5 +++-- internal/service/ref/refname_test.go | 5 +++-- internal/service/ref/refs.go | 7 ++++--- internal/service/ref/refs_test.go | 5 +++-- internal/service/ref/remote_branches.go | 5 +++-- internal/service/ref/remote_branches_test.go | 5 +++-- internal/service/ref/tag_messages.go | 5 +++-- internal/service/ref/tag_messages_test.go | 3 ++- internal/service/ref/testhelper_test.go | 5 +++-- internal/service/ref/util.go | 5 +++-- internal/service/ref/util_test.go | 1 + internal/service/register.go | 7 ++++--- internal/service/remote/fetch_internal_remote.go | 5 +++-- internal/service/remote/fetch_internal_remote_test.go | 7 ++++--- internal/service/remote/find_remote_root_ref.go | 5 +++-- internal/service/remote/find_remote_root_ref_test.go | 3 ++- internal/service/remote/remotes.go | 7 ++++--- internal/service/remote/remotes_test.go | 5 +++-- internal/service/remote/testhelper_test.go | 5 +++-- internal/service/remote/update_remote_mirror.go | 5 +++-- internal/service/remote/update_remote_mirror_test.go | 5 +++-- internal/service/repository/apply_gitattributes.go | 7 ++++--- .../service/repository/apply_gitattributes_test.go | 3 ++- internal/service/repository/archive.go | 5 +++-- internal/service/repository/archive_test.go | 3 ++- internal/service/repository/backup_custom_hooks.go | 5 +++-- .../service/repository/backup_custom_hooks_test.go | 1 + internal/service/repository/calculate_checksum.go | 7 ++++--- .../service/repository/calculate_checksum_test.go | 3 ++- internal/service/repository/cleanup.go | 5 +++-- internal/service/repository/cleanup_test.go | 1 + internal/service/repository/config.go | 7 ++++--- internal/service/repository/config_test.go | 5 +++-- internal/service/repository/create.go | 3 ++- internal/service/repository/create_bundle.go | 5 +++-- internal/service/repository/create_bundle_test.go | 3 ++- internal/service/repository/create_from_bundle.go | 5 +++-- .../service/repository/create_from_bundle_test.go | 3 ++- internal/service/repository/create_from_snapshot.go | 7 ++++--- .../service/repository/create_from_snapshot_test.go | 3 ++- internal/service/repository/create_from_url.go | 7 ++++--- internal/service/repository/create_from_url_test.go | 3 ++- internal/service/repository/create_test.go | 3 ++- internal/service/repository/fetch.go | 3 ++- internal/service/repository/fetch_remote.go | 3 ++- internal/service/repository/fetch_remote_test.go | 3 ++- internal/service/repository/fetch_test.go | 9 +++++---- internal/service/repository/fork.go | 7 ++++--- internal/service/repository/fork_test.go | 5 +++-- internal/service/repository/fsck.go | 3 ++- internal/service/repository/fsck_test.go | 1 + internal/service/repository/gc.go | 7 ++++--- internal/service/repository/gc_test.go | 3 ++- internal/service/repository/info_attributes.go | 5 +++-- internal/service/repository/info_attributes_test.go | 1 + internal/service/repository/license.go | 3 ++- internal/service/repository/license_test.go | 1 + internal/service/repository/merge_base.go | 5 +++-- internal/service/repository/merge_base_test.go | 3 ++- internal/service/repository/raw_changes.go | 5 +++-- internal/service/repository/raw_changes_test.go | 3 ++- internal/service/repository/rebase_in_progress.go | 7 ++++--- .../service/repository/rebase_in_progress_test.go | 3 ++- internal/service/repository/repack.go | 5 +++-- internal/service/repository/repack_test.go | 3 ++- internal/service/repository/repository.go | 7 ++++--- internal/service/repository/repository_test.go | 5 +++-- internal/service/repository/restore_custom_hooks.go | 5 +++-- .../service/repository/restore_custom_hooks_test.go | 3 ++- internal/service/repository/search_files.go | 5 +++-- internal/service/repository/search_files_test.go | 3 ++- internal/service/repository/size.go | 3 ++- internal/service/repository/size_test.go | 5 +++-- internal/service/repository/snapshot.go | 5 +++-- internal/service/repository/snapshot_test.go | 3 ++- internal/service/repository/squash_in_progress.go | 5 +++-- .../service/repository/squash_in_progress_test.go | 3 ++- internal/service/repository/testhelper_test.go | 5 +++-- internal/service/repository/util.go | 3 ++- internal/service/repository/write_config.go | 3 ++- internal/service/repository/write_config_test.go | 3 ++- internal/service/repository/write_ref.go | 7 ++++--- internal/service/repository/write_ref_test.go | 3 ++- internal/service/server/info.go | 3 ++- internal/service/server/info_test.go | 5 +++-- internal/service/smarthttp/inforefs.go | 5 +++-- internal/service/smarthttp/inforefs_test.go | 5 +++-- internal/service/smarthttp/receive_pack.go | 5 +++-- internal/service/smarthttp/receive_pack_test.go | 5 +++-- internal/service/smarthttp/testhelper_test.go | 5 +++-- internal/service/smarthttp/upload_pack.go | 5 +++-- internal/service/smarthttp/upload_pack_test.go | 5 +++-- internal/service/ssh/receive_pack.go | 5 +++-- internal/service/ssh/receive_pack_test.go | 5 +++-- internal/service/ssh/testhelper_test.go | 5 +++-- internal/service/ssh/upload_archive.go | 5 +++-- internal/service/ssh/upload_archive_test.go | 5 +++-- internal/service/ssh/upload_pack.go | 5 +++-- internal/service/ssh/upload_pack_test.go | 5 +++-- internal/service/storage/deleteall.go | 7 ++++--- internal/service/storage/deleteall_test.go | 5 +++-- internal/service/storage/listdirectories.go | 5 +++-- internal/service/storage/listdirectories_test.go | 1 + internal/service/storage/testhelper_test.go | 5 +++-- internal/service/wiki/delete_page.go | 5 +++-- internal/service/wiki/delete_page_test.go | 3 ++- internal/service/wiki/find_file.go | 5 +++-- internal/service/wiki/find_file_test.go | 3 ++- internal/service/wiki/find_page.go | 5 +++-- internal/service/wiki/find_page_test.go | 3 ++- internal/service/wiki/formatted_data.go | 5 +++-- internal/service/wiki/formatted_data_test.go | 3 ++- internal/service/wiki/get_all_pages_test.go | 3 ++- internal/service/wiki/get_page_versions.go | 5 +++-- internal/service/wiki/get_page_versions_test.go | 1 + internal/service/wiki/testhelper_test.go | 5 +++-- internal/service/wiki/update_page.go | 5 +++-- internal/service/wiki/update_page_test.go | 3 ++- internal/service/wiki/write_page.go | 5 +++-- internal/service/wiki/write_page_test.go | 3 ++- internal/supervisor/supervisor_test.go | 1 + internal/tempdir/tempdir.go | 1 + internal/tempdir/tempdir_test.go | 1 + internal/testhelper/testhelper.go | 9 +++++---- 253 files changed, 663 insertions(+), 408 deletions(-) diff --git a/_support/makegen.go b/_support/makegen.go index e5f8b5ca06c..33d056f94d5 100644 --- a/_support/makegen.go +++ b/_support/makegen.go @@ -69,8 +69,11 @@ func (gm *gitalyMake) BuildDir() string { return gm.cwd } -func (gm *gitalyMake) Pkg() string { return "gitlab.com/gitlab-org/gitaly" } -func (gm *gitalyMake) GoImports() string { return "bin/goimports" } +func (gm *gitalyMake) Pkg() string { return "gitlab.com/gitlab-org/gitaly" } +func (gm *gitalyMake) GoImports() string { return "bin/goimports" } +func (gm *gitalyMake) GoImportsFlags() string { + return fmt.Sprintf("-local %s,gitlab.com/gitlab-org/gitaly-proto", gm.Pkg()) +} func (gm *gitalyMake) GoCovMerge() string { return "bin/gocovmerge" } func (gm *gitalyMake) GoLint() string { return "bin/golint" } func (gm *gitalyMake) GoVendor() string { return "bin/govendor" } @@ -325,7 +328,7 @@ lint: {{ .GoLint }} .PHONY: check-formatting check-formatting: {{ .GoImports }} # goimports - @cd {{ .SourceDir }} && goimports -e -l {{ join .GoFiles " " }} | awk '{ print } END { if(NR>0) { print "Formatting error, run make format"; exit(1) } }' + @cd {{ .SourceDir }} && goimports {{ .GoImportsFlags }} -e -l {{ join .GoFiles " " }} | awk '{ print } END { if(NR>0) { print "Formatting error, run make format"; exit(1) } }' {{ .GoImports }}: go get golang.org/x/tools/cmd/goimports @@ -334,7 +337,7 @@ check-formatting: {{ .GoImports }} format: {{ .GoImports }} # In addition to fixing imports, goimports also formats your code in the same style as gofmt # so it can be used as a replacement. - @cd {{ .SourceDir }} && goimports -w -l {{ join .GoFiles " " }} + @cd {{ .SourceDir }} && goimports {{ .GoImportsFlags }} -w -l {{ join .GoFiles " " }} .PHONY: megacheck megacheck: {{ .MegaCheck }} diff --git a/client/receive_pack.go b/client/receive_pack.go index 767b392e5c5..9945814fd22 100644 --- a/client/receive_pack.go +++ b/client/receive_pack.go @@ -3,10 +3,11 @@ package client import ( "io" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" - "gitlab.com/gitlab-org/gitaly/streamio" "golang.org/x/net/context" "google.golang.org/grpc" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/streamio" ) // ReceivePack proxies an SSH git-receive-pack (git push) session to Gitaly diff --git a/client/upload_archive.go b/client/upload_archive.go index 2459519b3ee..d455f60b8d2 100644 --- a/client/upload_archive.go +++ b/client/upload_archive.go @@ -3,10 +3,11 @@ package client import ( "io" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" - "gitlab.com/gitlab-org/gitaly/streamio" "golang.org/x/net/context" "google.golang.org/grpc" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/streamio" ) // UploadArchive proxies an SSH git-upload-archive (git archive --remote) session to Gitaly diff --git a/client/upload_pack.go b/client/upload_pack.go index 08372c5fcb5..95473c2c6db 100644 --- a/client/upload_pack.go +++ b/client/upload_pack.go @@ -3,10 +3,11 @@ package client import ( "io" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" - "gitlab.com/gitlab-org/gitaly/streamio" "golang.org/x/net/context" "google.golang.org/grpc" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/streamio" ) // UploadPack proxies an SSH git-upload-pack (git fetch) session to Gitaly diff --git a/cmd/gitaly-ssh/main.go b/cmd/gitaly-ssh/main.go index 0481741332e..a8f7d6050eb 100644 --- a/cmd/gitaly-ssh/main.go +++ b/cmd/gitaly-ssh/main.go @@ -4,9 +4,10 @@ import ( "log" "os" + "google.golang.org/grpc" + "gitlab.com/gitlab-org/gitaly/auth" "gitlab.com/gitlab-org/gitaly/client" - "google.golang.org/grpc" ) type packFn func(_, _ string) (int32, error) diff --git a/cmd/gitaly-ssh/receive_pack.go b/cmd/gitaly-ssh/receive_pack.go index 7008ee19a0b..6871c3d21ae 100644 --- a/cmd/gitaly-ssh/receive_pack.go +++ b/cmd/gitaly-ssh/receive_pack.go @@ -6,6 +6,7 @@ import ( "os" "github.com/golang/protobuf/jsonpb" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/client" ) diff --git a/cmd/gitaly-ssh/upload_archive.go b/cmd/gitaly-ssh/upload_archive.go index c7fa7356e32..6a065cffa02 100644 --- a/cmd/gitaly-ssh/upload_archive.go +++ b/cmd/gitaly-ssh/upload_archive.go @@ -6,6 +6,7 @@ import ( "os" "github.com/golang/protobuf/jsonpb" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/client" ) diff --git a/cmd/gitaly-ssh/upload_pack.go b/cmd/gitaly-ssh/upload_pack.go index cd3a26d8360..599481fc731 100644 --- a/cmd/gitaly-ssh/upload_pack.go +++ b/cmd/gitaly-ssh/upload_pack.go @@ -6,6 +6,7 @@ import ( "os" "github.com/golang/protobuf/jsonpb" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/client" ) diff --git a/cmd/gitaly/main.go b/cmd/gitaly/main.go index 9bacea720f4..79389f72042 100644 --- a/cmd/gitaly/main.go +++ b/cmd/gitaly/main.go @@ -12,6 +12,7 @@ import ( "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" diff --git a/internal/command/command.go b/internal/command/command.go index bcd634ffe2e..735d4a227c5 100644 --- a/internal/command/command.go +++ b/internal/command/command.go @@ -13,6 +13,7 @@ import ( "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" log "github.com/sirupsen/logrus" + "gitlab.com/gitlab-org/gitaly/internal/config" ) diff --git a/internal/config/prometheus.go b/internal/config/prometheus.go index 2d8936f9afb..1577bffe8cc 100644 --- a/internal/config/prometheus.go +++ b/internal/config/prometheus.go @@ -4,6 +4,7 @@ import ( "github.com/grpc-ecosystem/go-grpc-prometheus" "github.com/prometheus/client_golang/prometheus" log "github.com/sirupsen/logrus" + "gitlab.com/gitlab-org/gitaly/internal/middleware/limithandler" ) diff --git a/internal/config/sentry.go b/internal/config/sentry.go index f67169b831b..00da806d559 100644 --- a/internal/config/sentry.go +++ b/internal/config/sentry.go @@ -5,6 +5,7 @@ import ( "github.com/getsentry/raven-go" log "github.com/sirupsen/logrus" + "gitlab.com/gitlab-org/gitaly/internal/middleware/panichandler" ) diff --git a/internal/git/catfile/batch.go b/internal/git/catfile/batch.go index c712b33a6a2..7848c435137 100644 --- a/internal/git/catfile/batch.go +++ b/internal/git/catfile/batch.go @@ -8,9 +8,10 @@ import ( "io/ioutil" "sync" - "gitlab.com/gitlab-org/gitaly/internal/git" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + + "gitlab.com/gitlab-org/gitaly/internal/git" ) // batch encapsulates a 'git cat-file --batch' process diff --git a/internal/git/catfile/batchcheck.go b/internal/git/catfile/batchcheck.go index 9dc3356eee8..372319cc0de 100644 --- a/internal/git/catfile/batchcheck.go +++ b/internal/git/catfile/batchcheck.go @@ -7,9 +7,10 @@ import ( "io" "sync" - "gitlab.com/gitlab-org/gitaly/internal/git" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + + "gitlab.com/gitlab-org/gitaly/internal/git" ) // batchCheck encapsulates a 'git cat-file --batch-check' process diff --git a/internal/git/catfile/catfile_test.go b/internal/git/catfile/catfile_test.go index 386f1d2b045..ac12b8c496a 100644 --- a/internal/git/catfile/catfile_test.go +++ b/internal/git/catfile/catfile_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/stretchr/testify/require" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) diff --git a/internal/git/log/commit.go b/internal/git/log/commit.go index 0ded22414d9..9b33afd248d 100644 --- a/internal/git/log/commit.go +++ b/internal/git/log/commit.go @@ -9,6 +9,7 @@ import ( "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" diff --git a/internal/git/log/commit_test.go b/internal/git/log/commit_test.go index b3144aceddc..3f3370c58de 100644 --- a/internal/git/log/commit_test.go +++ b/internal/git/log/commit_test.go @@ -5,6 +5,7 @@ import ( "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/git/catfile" ) diff --git a/internal/git/log/last_commit.go b/internal/git/log/last_commit.go index 872b5b2bd9e..91a8f1c728c 100644 --- a/internal/git/log/last_commit.go +++ b/internal/git/log/last_commit.go @@ -7,6 +7,7 @@ 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/command" "gitlab.com/gitlab-org/gitaly/internal/git" diff --git a/internal/helper/repo.go b/internal/helper/repo.go index 5397b2fcaee..79cb80d696b 100644 --- a/internal/helper/repo.go +++ b/internal/helper/repo.go @@ -4,10 +4,11 @@ import ( "os" "path" - "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/config" ) // GetRepoPath returns the full path of the repository referenced by an diff --git a/internal/helper/repo_test.go b/internal/helper/repo_test.go index ca2c43cc27a..6317e34f692 100644 --- a/internal/helper/repo_test.go +++ b/internal/helper/repo_test.go @@ -6,10 +6,11 @@ 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/config" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "google.golang.org/grpc/codes" ) func TestGetRepoPath(t *testing.T) { diff --git a/internal/helper/storage.go b/internal/helper/storage.go index 5405421ce38..bc39d389127 100644 --- a/internal/helper/storage.go +++ b/internal/helper/storage.go @@ -5,9 +5,10 @@ import ( "encoding/json" "fmt" - "gitlab.com/gitlab-org/gitaly/internal/storage" "golang.org/x/net/context" "google.golang.org/grpc/metadata" + + "gitlab.com/gitlab-org/gitaly/internal/storage" ) // ExtractGitalyServers extracts `storage.GitalyServers` from an incoming context. diff --git a/internal/helper/storage_test.go b/internal/helper/storage_test.go index d0f229e0e9e..ed8540e7e0c 100644 --- a/internal/helper/storage_test.go +++ b/internal/helper/storage_test.go @@ -5,9 +5,10 @@ import ( "testing" "github.com/stretchr/testify/require" + "google.golang.org/grpc/metadata" + "gitlab.com/gitlab-org/gitaly/internal/storage" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "google.golang.org/grpc/metadata" ) func TestExtractGitalyServers(t *testing.T) { diff --git a/internal/linguist/linguist_test.go b/internal/linguist/linguist_test.go index aac91d866d0..9269db6d871 100644 --- a/internal/linguist/linguist_test.go +++ b/internal/linguist/linguist_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/stretchr/testify/require" + "gitlab.com/gitlab-org/gitaly/internal/config" "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) diff --git a/internal/middleware/limithandler/limithandler_test.go b/internal/middleware/limithandler/limithandler_test.go index ee5e24b1068..27f393be7e2 100644 --- a/internal/middleware/limithandler/limithandler_test.go +++ b/internal/middleware/limithandler/limithandler_test.go @@ -7,11 +7,12 @@ import ( "time" "github.com/stretchr/testify/require" + "golang.org/x/net/context" + "google.golang.org/grpc" + "gitlab.com/gitlab-org/gitaly/internal/middleware/limithandler" pb "gitlab.com/gitlab-org/gitaly/internal/middleware/limithandler/testpb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" - "google.golang.org/grpc" ) func fixedLockKey(ctx context.Context) string { diff --git a/internal/middleware/limithandler/testhelper_test.go b/internal/middleware/limithandler/testhelper_test.go index 40eff4f0188..81f0b362996 100644 --- a/internal/middleware/limithandler/testhelper_test.go +++ b/internal/middleware/limithandler/testhelper_test.go @@ -3,8 +3,9 @@ package limithandler_test import ( "sync/atomic" - pb "gitlab.com/gitlab-org/gitaly/internal/middleware/limithandler/testpb" "golang.org/x/net/context" + + pb "gitlab.com/gitlab-org/gitaly/internal/middleware/limithandler/testpb" ) type server struct { diff --git a/internal/middleware/metadatahandler/metadatahandler.go b/internal/middleware/metadatahandler/metadatahandler.go index 9cabc284080..696ca4596f8 100644 --- a/internal/middleware/metadatahandler/metadatahandler.go +++ b/internal/middleware/metadatahandler/metadatahandler.go @@ -3,11 +3,12 @@ package metadatahandler import ( "github.com/grpc-ecosystem/go-grpc-middleware/tags" "github.com/prometheus/client_golang/prometheus" - "gitlab.com/gitlab-org/gitaly/auth" - "gitlab.com/gitlab-org/gitaly/internal/helper" "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/metadata" + + "gitlab.com/gitlab-org/gitaly/auth" + "gitlab.com/gitlab-org/gitaly/internal/helper" ) var ( diff --git a/internal/middleware/sentryhandler/sentryhandler.go b/internal/middleware/sentryhandler/sentryhandler.go index 5deff9e0d4f..6d16500c524 100644 --- a/internal/middleware/sentryhandler/sentryhandler.go +++ b/internal/middleware/sentryhandler/sentryhandler.go @@ -7,10 +7,11 @@ import ( raven "github.com/getsentry/raven-go" "github.com/grpc-ecosystem/go-grpc-middleware/tags" - "gitlab.com/gitlab-org/gitaly/internal/helper" "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/codes" + + "gitlab.com/gitlab-org/gitaly/internal/helper" ) var ignoredCodes = []codes.Code{ diff --git a/internal/rubyserver/concurrency_test.go b/internal/rubyserver/concurrency_test.go index e82311513e5..c7d7830090c 100644 --- a/internal/rubyserver/concurrency_test.go +++ b/internal/rubyserver/concurrency_test.go @@ -7,11 +7,12 @@ import ( "testing" "time" - "gitlab.com/gitlab-org/gitaly/internal/config" - "gitlab.com/gitlab-org/gitaly/internal/testhelper" "google.golang.org/grpc/codes" healthpb "google.golang.org/grpc/health/grpc_health_v1" "google.golang.org/grpc/status" + + "gitlab.com/gitlab-org/gitaly/internal/config" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) func waitPing(s *Server) error { diff --git a/internal/rubyserver/health_test.go b/internal/rubyserver/health_test.go index 5d513b85d72..5c6c7ad3227 100644 --- a/internal/rubyserver/health_test.go +++ b/internal/rubyserver/health_test.go @@ -5,6 +5,7 @@ import ( "time" "github.com/stretchr/testify/require" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) diff --git a/internal/rubyserver/proxy.go b/internal/rubyserver/proxy.go index 98fe4bc2fb7..612b6b4e8e5 100644 --- a/internal/rubyserver/proxy.go +++ b/internal/rubyserver/proxy.go @@ -6,9 +6,10 @@ import ( "os" "strings" + "google.golang.org/grpc/metadata" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/helper" - "google.golang.org/grpc/metadata" ) // ProxyHeaderWhitelist is the list of http/2 headers that will be diff --git a/internal/rubyserver/proxy_test.go b/internal/rubyserver/proxy_test.go index 5b804c061d2..a096a8280f3 100644 --- a/internal/rubyserver/proxy_test.go +++ b/internal/rubyserver/proxy_test.go @@ -4,8 +4,9 @@ import ( "testing" "github.com/stretchr/testify/require" - "gitlab.com/gitlab-org/gitaly/internal/testhelper" "google.golang.org/grpc/metadata" + + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) func TestSetHeadersBlocksUnknownMetadata(t *testing.T) { diff --git a/internal/rubyserver/rubyserver.go b/internal/rubyserver/rubyserver.go index 46e935ca9ca..8c7c27c346e 100644 --- a/internal/rubyserver/rubyserver.go +++ b/internal/rubyserver/rubyserver.go @@ -13,6 +13,9 @@ import ( "github.com/grpc-ecosystem/go-grpc-prometheus" log "github.com/sirupsen/logrus" + "golang.org/x/net/context" + "google.golang.org/grpc" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/command" "gitlab.com/gitlab-org/gitaly/internal/config" @@ -21,8 +24,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/supervisor" "gitlab.com/gitlab-org/gitaly/internal/version" "gitlab.com/gitlab-org/gitaly/streamio" - "golang.org/x/net/context" - "google.golang.org/grpc" ) var ( diff --git a/internal/rubyserver/rubyserver_test.go b/internal/rubyserver/rubyserver_test.go index 68eddd548dd..8d7a266d710 100644 --- a/internal/rubyserver/rubyserver_test.go +++ b/internal/rubyserver/rubyserver_test.go @@ -5,9 +5,10 @@ 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 TestStopSafe(t *testing.T) { diff --git a/internal/rubyserver/worker.go b/internal/rubyserver/worker.go index 4dd44ae8fb1..75768645aa9 100644 --- a/internal/rubyserver/worker.go +++ b/internal/rubyserver/worker.go @@ -7,6 +7,7 @@ import ( "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" diff --git a/internal/rubyserver/worker_test.go b/internal/rubyserver/worker_test.go index 5b0599b74cd..ad86e792af2 100644 --- a/internal/rubyserver/worker_test.go +++ b/internal/rubyserver/worker_test.go @@ -6,6 +6,7 @@ import ( "time" "github.com/stretchr/testify/require" + "gitlab.com/gitlab-org/gitaly/internal/config" "gitlab.com/gitlab-org/gitaly/internal/supervisor" ) diff --git a/internal/server/auth/auth.go b/internal/server/auth/auth.go index 33fb6eb925f..87fb6a45194 100644 --- a/internal/server/auth/auth.go +++ b/internal/server/auth/auth.go @@ -5,12 +5,13 @@ import ( "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" "google.golang.org/grpc/status" + + "gitlab.com/gitlab-org/gitaly/auth" + "gitlab.com/gitlab-org/gitaly/internal/config" ) var ( diff --git a/internal/server/auth_test.go b/internal/server/auth_test.go index b50445a84fa..6741d223158 100644 --- a/internal/server/auth_test.go +++ b/internal/server/auth_test.go @@ -7,13 +7,14 @@ import ( "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" netctx "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/codes" healthpb "google.golang.org/grpc/health/grpc_health_v1" + + "gitlab.com/gitlab-org/gitaly/auth" + "gitlab.com/gitlab-org/gitaly/internal/config" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) func TestSanity(t *testing.T) { diff --git a/internal/server/server.go b/internal/server/server.go index 3abcceaeb82..0a181a93dd2 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -6,6 +6,10 @@ import ( "github.com/grpc-ecosystem/go-grpc-middleware/tags" "github.com/grpc-ecosystem/go-grpc-prometheus" log "github.com/sirupsen/logrus" + "golang.org/x/net/context" + "google.golang.org/grpc" + "google.golang.org/grpc/reflection" + "gitlab.com/gitlab-org/gitaly/internal/helper/fieldextractors" gitalylog "gitlab.com/gitlab-org/gitaly/internal/log" "gitlab.com/gitlab-org/gitaly/internal/logsanitizer" @@ -17,9 +21,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/rubyserver" "gitlab.com/gitlab-org/gitaly/internal/server/auth" "gitlab.com/gitlab-org/gitaly/internal/service" - "golang.org/x/net/context" - "google.golang.org/grpc" - "google.golang.org/grpc/reflection" ) func concurrencyKeyFn(ctx context.Context) string { diff --git a/internal/service/blob/get_blob.go b/internal/service/blob/get_blob.go index 0069ec778ab..f518d0d918d 100644 --- a/internal/service/blob/get_blob.go +++ b/internal/service/blob/get_blob.go @@ -4,12 +4,13 @@ import ( "fmt" "io" + "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/catfile" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/streamio" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) func (s *server) GetBlob(in *gitalypb.GetBlobRequest, stream gitalypb.BlobService_GetBlobServer) error { diff --git a/internal/service/blob/get_blob_test.go b/internal/service/blob/get_blob_test.go index 4f5bb7a37c6..3c31096e5a1 100644 --- a/internal/service/blob/get_blob_test.go +++ b/internal/service/blob/get_blob_test.go @@ -7,6 +7,7 @@ import ( "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" diff --git a/internal/service/blob/get_blobs.go b/internal/service/blob/get_blobs.go index 4bb70ee5fbb..40c8c343e0d 100644 --- a/internal/service/blob/get_blobs.go +++ b/internal/service/blob/get_blobs.go @@ -4,12 +4,13 @@ import ( "io" "io/ioutil" + "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/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" ) func sendGetBlobsResponse(req *gitalypb.GetBlobsRequest, stream gitalypb.BlobService_GetBlobsServer, c *catfile.Batch) error { diff --git a/internal/service/blob/get_blobs_test.go b/internal/service/blob/get_blobs_test.go index 85b0ca23d0c..925dd1a5e4a 100644 --- a/internal/service/blob/get_blobs_test.go +++ b/internal/service/blob/get_blobs_test.go @@ -7,9 +7,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/testhelper" - "google.golang.org/grpc/codes" ) func TestSuccessfulGetBlobsRequest(t *testing.T) { diff --git a/internal/service/blob/lfs_pointers.go b/internal/service/blob/lfs_pointers.go index e83fe3504ca..0f9dedd5eca 100644 --- a/internal/service/blob/lfs_pointers.go +++ b/internal/service/blob/lfs_pointers.go @@ -3,11 +3,12 @@ package blob import ( "fmt" + "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/rubyserver" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) type getLFSPointerByRevisionRequest interface { diff --git a/internal/service/blob/lfs_pointers_test.go b/internal/service/blob/lfs_pointers_test.go index 3dedf32afb9..89324df6474 100644 --- a/internal/service/blob/lfs_pointers_test.go +++ b/internal/service/blob/lfs_pointers_test.go @@ -6,9 +6,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/testhelper" - "google.golang.org/grpc/codes" ) func TestSuccessfulGetLFSPointersRequest(t *testing.T) { diff --git a/internal/service/blob/testhelper_test.go b/internal/service/blob/testhelper_test.go index 19a7bc53446..f6044838bc2 100644 --- a/internal/service/blob/testhelper_test.go +++ b/internal/service/blob/testhelper_test.go @@ -7,11 +7,12 @@ import ( "testing" "time" + "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" ) var rubyServer *rubyserver.Server diff --git a/internal/service/commit/between.go b/internal/service/commit/between.go index be761556e62..b3df8a2855e 100644 --- a/internal/service/commit/between.go +++ b/internal/service/commit/between.go @@ -3,10 +3,11 @@ package commit import ( "fmt" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" - "gitlab.com/gitlab-org/gitaly/internal/git" "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" ) type commitsBetweenSender struct { diff --git a/internal/service/commit/between_test.go b/internal/service/commit/between_test.go index 8f6fdd1cc8c..80d7272558b 100644 --- a/internal/service/commit/between_test.go +++ b/internal/service/commit/between_test.go @@ -6,10 +6,11 @@ import ( "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) func TestSuccessfulCommitsBetween(t *testing.T) { diff --git a/internal/service/commit/commit_messages.go b/internal/service/commit/commit_messages.go index 7d041ae941a..3168cce003d 100644 --- a/internal/service/commit/commit_messages.go +++ b/internal/service/commit/commit_messages.go @@ -3,10 +3,11 @@ package commit import ( "fmt" - "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/rubyserver" ) func (s *server) GetCommitMessages(request *gitalypb.GetCommitMessagesRequest, stream gitalypb.CommitService_GetCommitMessagesServer) error { diff --git a/internal/service/commit/commit_messages_test.go b/internal/service/commit/commit_messages_test.go index 48bda100769..22fb3e99a34 100644 --- a/internal/service/commit/commit_messages_test.go +++ b/internal/service/commit/commit_messages_test.go @@ -6,10 +6,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/helper" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "google.golang.org/grpc/codes" ) func TestSuccessfulGetCommitMessagesRequest(t *testing.T) { diff --git a/internal/service/commit/commit_signatures.go b/internal/service/commit/commit_signatures.go index d6982a7afc9..896e55a0883 100644 --- a/internal/service/commit/commit_signatures.go +++ b/internal/service/commit/commit_signatures.go @@ -3,10 +3,11 @@ package commit import ( "fmt" - "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/rubyserver" ) func (s *server) GetCommitSignatures(request *gitalypb.GetCommitSignaturesRequest, stream gitalypb.CommitService_GetCommitSignaturesServer) error { diff --git a/internal/service/commit/commit_signatures_test.go b/internal/service/commit/commit_signatures_test.go index 69640cda541..ec8119bc678 100644 --- a/internal/service/commit/commit_signatures_test.go +++ b/internal/service/commit/commit_signatures_test.go @@ -5,9 +5,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/testhelper" - "google.golang.org/grpc/codes" ) func TestSuccessfulGetCommitSignaturesRequest(t *testing.T) { diff --git a/internal/service/commit/commits_by_message.go b/internal/service/commit/commits_by_message.go index a1a06fbdbeb..2e660ca68f1 100644 --- a/internal/service/commit/commits_by_message.go +++ b/internal/service/commit/commits_by_message.go @@ -3,9 +3,10 @@ package commit import ( "fmt" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" ) type commitsByMessageSender struct { diff --git a/internal/service/commit/commits_by_message_test.go b/internal/service/commit/commits_by_message_test.go index ca183c3efa6..b8ca23f3f98 100644 --- a/internal/service/commit/commits_by_message_test.go +++ b/internal/service/commit/commits_by_message_test.go @@ -6,10 +6,11 @@ import ( "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) func TestSuccessfulCommitsByMessageRequest(t *testing.T) { diff --git a/internal/service/commit/commits_helper.go b/internal/service/commit/commits_helper.go index 83b07907030..78bfec02a8f 100644 --- a/internal/service/commit/commits_helper.go +++ b/internal/service/commit/commits_helper.go @@ -4,6 +4,7 @@ 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" ) diff --git a/internal/service/commit/count_commits.go b/internal/service/commit/count_commits.go index 1b4a96b3257..fdc321c541b 100644 --- a/internal/service/commit/count_commits.go +++ b/internal/service/commit/count_commits.go @@ -8,11 +8,12 @@ import ( "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" "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 (s *server) CountCommits(ctx context.Context, in *gitalypb.CountCommitsRequest) (*gitalypb.CountCommitsResponse, error) { diff --git a/internal/service/commit/count_commits_test.go b/internal/service/commit/count_commits_test.go index ec0acae174c..98f37e52c02 100644 --- a/internal/service/commit/count_commits_test.go +++ b/internal/service/commit/count_commits_test.go @@ -7,10 +7,11 @@ import ( "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) func TestSuccessfulCountCommitsRequest(t *testing.T) { diff --git a/internal/service/commit/extractsignature_test.go b/internal/service/commit/extractsignature_test.go index 786fde75f1a..543218a408c 100644 --- a/internal/service/commit/extractsignature_test.go +++ b/internal/service/commit/extractsignature_test.go @@ -6,10 +6,11 @@ import ( "testing" "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) func TestExtractCommitSignatureSuccess(t *testing.T) { diff --git a/internal/service/commit/filter_shas_with_signatures.go b/internal/service/commit/filter_shas_with_signatures.go index 6e879169b47..e0854156a5e 100644 --- a/internal/service/commit/filter_shas_with_signatures.go +++ b/internal/service/commit/filter_shas_with_signatures.go @@ -1,10 +1,11 @@ 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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/rubyserver" ) func (s *server) FilterShasWithSignatures(bidi gitalypb.CommitService_FilterShasWithSignaturesServer) error { diff --git a/internal/service/commit/filter_shas_with_signatures_test.go b/internal/service/commit/filter_shas_with_signatures_test.go index dbda54e6574..138db94d2de 100644 --- a/internal/service/commit/filter_shas_with_signatures_test.go +++ b/internal/service/commit/filter_shas_with_signatures_test.go @@ -5,9 +5,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/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 e6fc1049d1c..e9f79b5ccdc 100644 --- a/internal/service/commit/find_all_commits.go +++ b/internal/service/commit/find_all_commits.go @@ -3,10 +3,11 @@ package commit import ( "fmt" - "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/service/ref" ) // We declare this function in variables so that we can override them in our tests diff --git a/internal/service/commit/find_all_commits_test.go b/internal/service/commit/find_all_commits_test.go index e1e696b52b5..1ffac64dca0 100644 --- a/internal/service/commit/find_all_commits_test.go +++ b/internal/service/commit/find_all_commits_test.go @@ -6,11 +6,12 @@ import ( "github.com/golang/protobuf/ptypes/timestamp" "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/service/ref" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" - "google.golang.org/grpc/codes" ) func TestSuccessfulFindAllCommitsRequest(t *testing.T) { diff --git a/internal/service/commit/find_commit.go b/internal/service/commit/find_commit.go index a0a474e9fc1..ea7fc1ac6a2 100644 --- a/internal/service/commit/find_commit.go +++ b/internal/service/commit/find_commit.go @@ -1,12 +1,13 @@ package commit 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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/git" + "gitlab.com/gitlab-org/gitaly/internal/git/log" ) func (s *server) FindCommit(ctx context.Context, in *gitalypb.FindCommitRequest) (*gitalypb.FindCommitResponse, error) { diff --git a/internal/service/commit/find_commit_test.go b/internal/service/commit/find_commit_test.go index bdf8e35b276..4994e0ab89e 100644 --- a/internal/service/commit/find_commit_test.go +++ b/internal/service/commit/find_commit_test.go @@ -7,15 +7,16 @@ import ( "github.com/golang/protobuf/ptypes/timestamp" "github.com/stretchr/testify/require" + "golang.org/x/net/context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/featureflag" "gitlab.com/gitlab-org/gitaly/internal/git/log" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" ) func TestSuccessfulFindCommitRequest(t *testing.T) { diff --git a/internal/service/commit/find_commits.go b/internal/service/commit/find_commits.go index 6aa4d729824..20fae44f45b 100644 --- a/internal/service/commit/find_commits.go +++ b/internal/service/commit/find_commits.go @@ -1,10 +1,11 @@ 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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/rubyserver" ) func (s *server) FindCommits(req *gitalypb.FindCommitsRequest, stream gitalypb.CommitService_FindCommitsServer) error { diff --git a/internal/service/commit/find_commits_test.go b/internal/service/commit/find_commits_test.go index 4027414e7e5..35d53a3eaab 100644 --- a/internal/service/commit/find_commits_test.go +++ b/internal/service/commit/find_commits_test.go @@ -10,9 +10,10 @@ import ( "github.com/golang/protobuf/ptypes/timestamp" "github.com/stretchr/testify/require" + "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 TestFindCommitsFields(t *testing.T) { diff --git a/internal/service/commit/isancestor.go b/internal/service/commit/isancestor.go index 88be2ec0f87..869f8db9531 100644 --- a/internal/service/commit/isancestor.go +++ b/internal/service/commit/isancestor.go @@ -3,11 +3,12 @@ package commit 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 (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 1d958ef976e..baa4f44c878 100644 --- a/internal/service/commit/isancestor_test.go +++ b/internal/service/commit/isancestor_test.go @@ -6,11 +6,12 @@ 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/helper" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" - "google.golang.org/grpc/codes" ) func TestCommitIsAncestorFailure(t *testing.T) { diff --git a/internal/service/commit/languages.go b/internal/service/commit/languages.go index 052de5bf9e9..5c15056a2b6 100644 --- a/internal/service/commit/languages.go +++ b/internal/service/commit/languages.go @@ -5,14 +5,15 @@ import ( "sort" "strings" + "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" "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 2d82a7712d9..9a7ae5890a8 100644 --- a/internal/service/commit/languages_test.go +++ b/internal/service/commit/languages_test.go @@ -5,6 +5,7 @@ import ( "testing" "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/last_commit_for_path.go b/internal/service/commit/last_commit_for_path.go index 9cf65f39c89..91986cb6f7d 100644 --- a/internal/service/commit/last_commit_for_path.go +++ b/internal/service/commit/last_commit_for_path.go @@ -3,11 +3,12 @@ package commit import ( "fmt" - "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/git/log" ) func (s *server) LastCommitForPath(ctx context.Context, in *gitalypb.LastCommitForPathRequest) (*gitalypb.LastCommitForPathResponse, error) { diff --git a/internal/service/commit/last_commit_for_path_test.go b/internal/service/commit/last_commit_for_path_test.go index 33232e98681..79e99061711 100644 --- a/internal/service/commit/last_commit_for_path_test.go +++ b/internal/service/commit/last_commit_for_path_test.go @@ -5,10 +5,11 @@ import ( "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) func TestSuccessfulLastCommitForPathRequest(t *testing.T) { diff --git a/internal/service/commit/list_commits_by_oid_test.go b/internal/service/commit/list_commits_by_oid_test.go index 2c994c9e204..f3d2be8a0f3 100644 --- a/internal/service/commit/list_commits_by_oid_test.go +++ b/internal/service/commit/list_commits_by_oid_test.go @@ -5,9 +5,10 @@ import ( "testing" "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" ) func TestSuccessfulListCommitsByOidRequest(t *testing.T) { diff --git a/internal/service/commit/list_files.go b/internal/service/commit/list_files.go index 96d108a657b..e1d5f1d4947 100644 --- a/internal/service/commit/list_files.go +++ b/internal/service/commit/list_files.go @@ -5,12 +5,13 @@ 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 d1eb82112a8..fd275ee9e87 100644 --- a/internal/service/commit/list_files_test.go +++ b/internal/service/commit/list_files_test.go @@ -6,11 +6,12 @@ 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 60d9c0952c7..c145bd0dfd4 100644 --- a/internal/service/commit/list_last_commits_for_tree.go +++ b/internal/service/commit/list_last_commits_for_tree.go @@ -5,13 +5,14 @@ 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 ed7e30dd5bf..c8147c08b7d 100644 --- a/internal/service/commit/list_last_commits_for_tree_test.go +++ b/internal/service/commit/list_last_commits_for_tree_test.go @@ -5,10 +5,11 @@ import ( "testing" "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) type commitInfo struct { diff --git a/internal/service/commit/raw_blame.go b/internal/service/commit/raw_blame.go index 7b00475e547..2c82fb2f9d6 100644 --- a/internal/service/commit/raw_blame.go +++ b/internal/service/commit/raw_blame.go @@ -5,11 +5,12 @@ import ( "io" "github.com/grpc-ecosystem/go-grpc-middleware/logging/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/streamio" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) func (s *server) RawBlame(in *gitalypb.RawBlameRequest, stream gitalypb.CommitService_RawBlameServer) error { diff --git a/internal/service/commit/raw_blame_test.go b/internal/service/commit/raw_blame_test.go index 034176c83ef..8967c9745cd 100644 --- a/internal/service/commit/raw_blame_test.go +++ b/internal/service/commit/raw_blame_test.go @@ -6,11 +6,12 @@ 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" "gitlab.com/gitlab-org/gitaly/streamio" - "golang.org/x/net/context" - "google.golang.org/grpc/codes" ) func TestSuccessfulRawBlameRequest(t *testing.T) { diff --git a/internal/service/commit/stats.go b/internal/service/commit/stats.go index 30605c80864..e8dc33fae84 100644 --- a/internal/service/commit/stats.go +++ b/internal/service/commit/stats.go @@ -1,10 +1,11 @@ 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 f9c7e847a14..93cbb67d05d 100644 --- a/internal/service/commit/stats_test.go +++ b/internal/service/commit/stats_test.go @@ -5,9 +5,10 @@ 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 4747082cc68..f5f79d4a4e4 100644 --- a/internal/service/commit/testhelper_test.go +++ b/internal/service/commit/testhelper_test.go @@ -8,12 +8,13 @@ import ( "github.com/golang/protobuf/ptypes/timestamp" 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/linguist" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "google.golang.org/grpc" - "google.golang.org/grpc/reflection" ) var () diff --git a/internal/service/commit/tree_entries.go b/internal/service/commit/tree_entries.go index 37b755e9b36..bde45fe398d 100644 --- a/internal/service/commit/tree_entries.go +++ b/internal/service/commit/tree_entries.go @@ -5,10 +5,11 @@ 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/catfile" "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/catfile" ) var maxTreeEntries = 1000 diff --git a/internal/service/commit/tree_entries_test.go b/internal/service/commit/tree_entries_test.go index 48a81a484a9..f8d31001940 100644 --- a/internal/service/commit/tree_entries_test.go +++ b/internal/service/commit/tree_entries_test.go @@ -6,10 +6,11 @@ import ( "testing" "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) func TestSuccessfulGetTreeEntries(t *testing.T) { diff --git a/internal/service/commit/tree_entry.go b/internal/service/commit/tree_entry.go index 0b054803d95..5c3e9218ee6 100644 --- a/internal/service/commit/tree_entry.go +++ b/internal/service/commit/tree_entry.go @@ -5,12 +5,13 @@ import ( "io" "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/catfile" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/streamio" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) func sendTreeEntry(stream gitalypb.CommitService_TreeEntryServer, c *catfile.Batch, revision, path string, limit int64) error { diff --git a/internal/service/commit/tree_entry_test.go b/internal/service/commit/tree_entry_test.go index 5d9a34f1365..33b681a9fbe 100644 --- a/internal/service/commit/tree_entry_test.go +++ b/internal/service/commit/tree_entry_test.go @@ -6,10 +6,11 @@ import ( "io" "testing" - "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) type treeEntry struct { diff --git a/internal/service/conflicts/list_conflict_files.go b/internal/service/conflicts/list_conflict_files.go index 0664feeb8f0..bd7155b9c5a 100644 --- a/internal/service/conflicts/list_conflict_files.go +++ b/internal/service/conflicts/list_conflict_files.go @@ -3,10 +3,11 @@ package conflicts import ( "fmt" - "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/rubyserver" ) func (s *server) ListConflictFiles(in *gitalypb.ListConflictFilesRequest, stream gitalypb.ConflictsService_ListConflictFilesServer) error { diff --git a/internal/service/conflicts/list_conflict_files_test.go b/internal/service/conflicts/list_conflict_files_test.go index 1570535aac7..add1b94a8dd 100644 --- a/internal/service/conflicts/list_conflict_files_test.go +++ b/internal/service/conflicts/list_conflict_files_test.go @@ -5,9 +5,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/testhelper" - "google.golang.org/grpc/codes" ) type conflictFile struct { diff --git a/internal/service/conflicts/resolve_conflicts.go b/internal/service/conflicts/resolve_conflicts.go index 72416953aff..156dc603a44 100644 --- a/internal/service/conflicts/resolve_conflicts.go +++ b/internal/service/conflicts/resolve_conflicts.go @@ -3,10 +3,11 @@ package conflicts import ( "fmt" - "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/rubyserver" ) func (s *server) ResolveConflicts(stream gitalypb.ConflictsService_ResolveConflictsServer) error { diff --git a/internal/service/conflicts/resolve_conflicts_test.go b/internal/service/conflicts/resolve_conflicts_test.go index 02c593c6835..d633c23d80d 100644 --- a/internal/service/conflicts/resolve_conflicts_test.go +++ b/internal/service/conflicts/resolve_conflicts_test.go @@ -6,14 +6,15 @@ import ( "testing" "github.com/stretchr/testify/require" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "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/conflicts" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" ) var ( diff --git a/internal/service/conflicts/testhelper_test.go b/internal/service/conflicts/testhelper_test.go index e5829809629..df31c839fd1 100644 --- a/internal/service/conflicts/testhelper_test.go +++ b/internal/service/conflicts/testhelper_test.go @@ -7,11 +7,12 @@ 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.go b/internal/service/diff/commit.go index 5037d47dbca..6b3401052d5 100644 --- a/internal/service/diff/commit.go +++ b/internal/service/diff/commit.go @@ -6,11 +6,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/diff" "gitlab.com/gitlab-org/gitaly/internal/git" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) type requestWithLeftRightCommitIds interface { diff --git a/internal/service/diff/commit_test.go b/internal/service/diff/commit_test.go index 6c0feb938fa..f6bec20fd01 100644 --- a/internal/service/diff/commit_test.go +++ b/internal/service/diff/commit_test.go @@ -7,11 +7,12 @@ 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/diff" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" - "google.golang.org/grpc/codes" ) func TestSuccessfulCommitDiffRequest(t *testing.T) { diff --git a/internal/service/diff/numstat.go b/internal/service/diff/numstat.go index f6a1aecce5d..d7e9814d683 100644 --- a/internal/service/diff/numstat.go +++ b/internal/service/diff/numstat.go @@ -3,12 +3,13 @@ package diff import ( "io" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/diff" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/helper" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) var ( diff --git a/internal/service/diff/numstat_test.go b/internal/service/diff/numstat_test.go index cb38d17e8e2..1bdec3a0b06 100644 --- a/internal/service/diff/numstat_test.go +++ b/internal/service/diff/numstat_test.go @@ -5,11 +5,12 @@ 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/diff" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" - "google.golang.org/grpc/codes" ) func TestSuccessfulDiffStatsRequest(t *testing.T) { diff --git a/internal/service/diff/patch_test.go b/internal/service/diff/patch_test.go index dbe75c4f57e..b849edfe920 100644 --- a/internal/service/diff/patch_test.go +++ b/internal/service/diff/patch_test.go @@ -5,6 +5,7 @@ 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 73fde92e5a4..549d1767b2e 100644 --- a/internal/service/diff/raw.go +++ b/internal/service/diff/raw.go @@ -3,12 +3,13 @@ package diff import ( "io" - "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/git" + "gitlab.com/gitlab-org/gitaly/streamio" ) func (s *server) RawDiff(in *gitalypb.RawDiffRequest, stream gitalypb.DiffService_RawDiffServer) error { diff --git a/internal/service/diff/raw_test.go b/internal/service/diff/raw_test.go index e775d48dd59..f8efefbb973 100644 --- a/internal/service/diff/raw_test.go +++ b/internal/service/diff/raw_test.go @@ -5,10 +5,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/testhelper" "gitlab.com/gitlab-org/gitaly/streamio" - "google.golang.org/grpc/codes" ) func TestSuccessfulRawDiffRequest(t *testing.T) { diff --git a/internal/service/diff/testhelper_test.go b/internal/service/diff/testhelper_test.go index 29a3704293b..8ebad69431e 100644 --- a/internal/service/diff/testhelper_test.go +++ b/internal/service/diff/testhelper_test.go @@ -7,11 +7,12 @@ 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/namespace.go b/internal/service/namespace/namespace.go index ef8abffe047..6d49342a591 100644 --- a/internal/service/namespace/namespace.go +++ b/internal/service/namespace/namespace.go @@ -4,11 +4,12 @@ import ( "os" "path" - "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 noNameError = status.Errorf(codes.InvalidArgument, "Name: cannot be empty") diff --git a/internal/service/namespace/namespace_test.go b/internal/service/namespace/namespace_test.go index f5ac3471f05..c8413b3169a 100644 --- a/internal/service/namespace/namespace_test.go +++ b/internal/service/namespace/namespace_test.go @@ -6,12 +6,13 @@ 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/config" "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 TestMain(m *testing.M) { diff --git a/internal/service/namespace/testhelper_test.go b/internal/service/namespace/testhelper_test.go index 3e08713d0c8..e930fe65be2 100644 --- a/internal/service/namespace/testhelper_test.go +++ b/internal/service/namespace/testhelper_test.go @@ -5,10 +5,11 @@ import ( "testing" "time" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" - "gitlab.com/gitlab-org/gitaly/internal/testhelper" "google.golang.org/grpc" "google.golang.org/grpc/reflection" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) func runNamespaceServer(t *testing.T) (*grpc.Server, string) { diff --git a/internal/service/operations/branches.go b/internal/service/operations/branches.go index 9a8840deded..b13830f109f 100644 --- a/internal/service/operations/branches.go +++ b/internal/service/operations/branches.go @@ -1,11 +1,12 @@ 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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/rubyserver" ) 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 ab6d8e5d596..e7d00da9015 100644 --- a/internal/service/operations/branches_test.go +++ b/internal/service/operations/branches_test.go @@ -8,11 +8,12 @@ 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/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.go b/internal/service/operations/cherry_pick.go index eaea5555861..a009db64ad1 100644 --- a/internal/service/operations/cherry_pick.go +++ b/internal/service/operations/cherry_pick.go @@ -1,11 +1,12 @@ 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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/rubyserver" ) func (s *server) UserCherryPick(ctx context.Context, req *gitalypb.UserCherryPickRequest) (*gitalypb.UserCherryPickResponse, error) { diff --git a/internal/service/operations/cherry_pick_test.go b/internal/service/operations/cherry_pick_test.go index 6326419ca78..fb6dcf1e849 100644 --- a/internal/service/operations/cherry_pick_test.go +++ b/internal/service/operations/cherry_pick_test.go @@ -8,14 +8,15 @@ import ( "testing" "github.com/stretchr/testify/require" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "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" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" ) func TestSuccessfulUserCherryPickRequest(t *testing.T) { diff --git a/internal/service/operations/commit_files.go b/internal/service/operations/commit_files.go index e9496d1af1d..b4463c4a03d 100644 --- a/internal/service/operations/commit_files.go +++ b/internal/service/operations/commit_files.go @@ -3,10 +3,11 @@ package operations import ( "fmt" - "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/rubyserver" ) func (s *server) UserCommitFiles(stream gitalypb.OperationService_UserCommitFilesServer) error { diff --git a/internal/service/operations/commit_files_test.go b/internal/service/operations/commit_files_test.go index ec76bad83d9..17e65da6162 100644 --- a/internal/service/operations/commit_files_test.go +++ b/internal/service/operations/commit_files_test.go @@ -8,12 +8,13 @@ import ( "testing" "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "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" ) var ( diff --git a/internal/service/operations/merge.go b/internal/service/operations/merge.go index 2e9470f5a78..34c096e609a 100644 --- a/internal/service/operations/merge.go +++ b/internal/service/operations/merge.go @@ -3,11 +3,12 @@ package operations 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" ) func (s *server) UserMergeBranch(bidi gitalypb.OperationService_UserMergeBranchServer) error { diff --git a/internal/service/operations/merge_test.go b/internal/service/operations/merge_test.go index 1fdea95dbad..12491d3f93a 100644 --- a/internal/service/operations/merge_test.go +++ b/internal/service/operations/merge_test.go @@ -12,10 +12,11 @@ import ( "time" "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" gitlog "gitlab.com/gitlab-org/gitaly/internal/git/log" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "google.golang.org/grpc/codes" ) var ( diff --git a/internal/service/operations/rebase.go b/internal/service/operations/rebase.go index 1fa5ea3419b..97b8c704c52 100644 --- a/internal/service/operations/rebase.go +++ b/internal/service/operations/rebase.go @@ -3,11 +3,12 @@ package operations 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" ) func (s *server) UserRebase(ctx context.Context, req *gitalypb.UserRebaseRequest) (*gitalypb.UserRebaseResponse, error) { diff --git a/internal/service/operations/rebase_test.go b/internal/service/operations/rebase_test.go index 18fca0c688f..79c8568173b 100644 --- a/internal/service/operations/rebase_test.go +++ b/internal/service/operations/rebase_test.go @@ -8,11 +8,12 @@ import ( "testing" "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "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" ) func TestSuccessfulUserRebaseRequest(t *testing.T) { diff --git a/internal/service/operations/revert.go b/internal/service/operations/revert.go index 2c501c4493d..c58ffc49d72 100644 --- a/internal/service/operations/revert.go +++ b/internal/service/operations/revert.go @@ -1,11 +1,12 @@ 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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/rubyserver" ) func (s *server) UserRevert(ctx context.Context, req *gitalypb.UserRevertRequest) (*gitalypb.UserRevertResponse, error) { diff --git a/internal/service/operations/revert_test.go b/internal/service/operations/revert_test.go index 340fb6416a3..08319fd4b43 100644 --- a/internal/service/operations/revert_test.go +++ b/internal/service/operations/revert_test.go @@ -7,12 +7,13 @@ import ( "testing" "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "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" ) func TestSuccessfulUserRevertRequest(t *testing.T) { diff --git a/internal/service/operations/squash.go b/internal/service/operations/squash.go index 8e007f69370..a62068f3811 100644 --- a/internal/service/operations/squash.go +++ b/internal/service/operations/squash.go @@ -3,11 +3,12 @@ package operations 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" ) func (s *server) UserSquash(ctx context.Context, req *gitalypb.UserSquashRequest) (*gitalypb.UserSquashResponse, error) { diff --git a/internal/service/operations/squash_test.go b/internal/service/operations/squash_test.go index 29d13183c78..01a7d137c31 100644 --- a/internal/service/operations/squash_test.go +++ b/internal/service/operations/squash_test.go @@ -4,10 +4,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/git/log" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "google.golang.org/grpc/codes" ) var ( diff --git a/internal/service/operations/tags.go b/internal/service/operations/tags.go index 09827d81ae8..08f0ea1fb85 100644 --- a/internal/service/operations/tags.go +++ b/internal/service/operations/tags.go @@ -1,9 +1,10 @@ package operations 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) UserDeleteTag(ctx context.Context, req *gitalypb.UserDeleteTagRequest) (*gitalypb.UserDeleteTagResponse, error) { diff --git a/internal/service/operations/tags_test.go b/internal/service/operations/tags_test.go index 385711a1107..15491d8ed15 100644 --- a/internal/service/operations/tags_test.go +++ b/internal/service/operations/tags_test.go @@ -9,10 +9,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/git/log" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "google.golang.org/grpc/codes" ) func TestSuccessfulUserDeleteTagRequest(t *testing.T) { diff --git a/internal/service/operations/testhelper_test.go b/internal/service/operations/testhelper_test.go index a000798689b..abbe7aa75f3 100644 --- a/internal/service/operations/testhelper_test.go +++ b/internal/service/operations/testhelper_test.go @@ -11,11 +11,12 @@ import ( log "github.com/sirupsen/logrus" "github.com/stretchr/testify/require" + "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" ) var ( diff --git a/internal/service/operations/update_branches_test.go b/internal/service/operations/update_branches_test.go index 6cc0aac1ff6..5bb025cfdd5 100644 --- a/internal/service/operations/update_branches_test.go +++ b/internal/service/operations/update_branches_test.go @@ -7,11 +7,12 @@ 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/git/log" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" - "google.golang.org/grpc/codes" ) var ( diff --git a/internal/service/ref/branches.go b/internal/service/ref/branches.go index 6d03816f7a4..655b21de451 100644 --- a/internal/service/ref/branches.go +++ b/internal/service/ref/branches.go @@ -1,9 +1,10 @@ package ref 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) CreateBranch(ctx context.Context, req *gitalypb.CreateBranchRequest) (*gitalypb.CreateBranchResponse, error) { diff --git a/internal/service/ref/branches_test.go b/internal/service/ref/branches_test.go index 104ff21a708..de793796283 100644 --- a/internal/service/ref/branches_test.go +++ b/internal/service/ref/branches_test.go @@ -6,10 +6,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/git/log" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "google.golang.org/grpc/codes" ) func TestSuccessfulCreateBranchRequest(t *testing.T) { diff --git a/internal/service/ref/delete_refs.go b/internal/service/ref/delete_refs.go index 27d9f92112a..4671adeec5c 100644 --- a/internal/service/ref/delete_refs.go +++ b/internal/service/ref/delete_refs.go @@ -3,11 +3,12 @@ package ref 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" ) func (s *server) DeleteRefs(ctx context.Context, in *gitalypb.DeleteRefsRequest) (*gitalypb.DeleteRefsResponse, error) { diff --git a/internal/service/ref/delete_refs_test.go b/internal/service/ref/delete_refs_test.go index a87318cf064..ea65c2a3c1c 100644 --- a/internal/service/ref/delete_refs_test.go +++ b/internal/service/ref/delete_refs_test.go @@ -4,9 +4,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/testhelper" - "google.golang.org/grpc/codes" ) func TestSuccessfulDeleteRefs(t *testing.T) { diff --git a/internal/service/ref/list_new_blobs.go b/internal/service/ref/list_new_blobs.go index ff3dcd3a944..53acd16d508 100644 --- a/internal/service/ref/list_new_blobs.go +++ b/internal/service/ref/list_new_blobs.go @@ -6,11 +6,12 @@ import ( "regexp" "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/git/catfile" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) func (s *server) ListNewBlobs(in *gitalypb.ListNewBlobsRequest, stream gitalypb.RefService_ListNewBlobsServer) error { diff --git a/internal/service/ref/list_new_blobs_test.go b/internal/service/ref/list_new_blobs_test.go index 7ad96f26eee..eb8a2a142f1 100644 --- a/internal/service/ref/list_new_blobs_test.go +++ b/internal/service/ref/list_new_blobs_test.go @@ -5,10 +5,11 @@ import ( "testing" "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" "google.golang.org/grpc/status" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) func TestListNewBlobs(t *testing.T) { diff --git a/internal/service/ref/list_new_commits.go b/internal/service/ref/list_new_commits.go index 4fb50c6f6d1..4aed5971986 100644 --- a/internal/service/ref/list_new_commits.go +++ b/internal/service/ref/list_new_commits.go @@ -3,12 +3,13 @@ package ref import ( "bufio" + "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/git/log" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) func (s *server) ListNewCommits(in *gitalypb.ListNewCommitsRequest, stream gitalypb.RefService_ListNewCommitsServer) error { diff --git a/internal/service/ref/list_new_commits_test.go b/internal/service/ref/list_new_commits_test.go index 2bc13b3abdb..6e4d2d0b198 100644 --- a/internal/service/ref/list_new_commits_test.go +++ b/internal/service/ref/list_new_commits_test.go @@ -5,10 +5,11 @@ import ( "testing" "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" "google.golang.org/grpc/status" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) func TestListNewCommits(t *testing.T) { diff --git a/internal/service/ref/refexists.go b/internal/service/ref/refexists.go index 819ff656a89..3bbaf68987f 100644 --- a/internal/service/ref/refexists.go +++ b/internal/service/ref/refexists.go @@ -5,12 +5,13 @@ 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/command" - "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/command" + "gitlab.com/gitlab-org/gitaly/internal/git" ) // 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 44fa71d93c8..69e4bdf44ea 100644 --- a/internal/service/ref/refexists_test.go +++ b/internal/service/ref/refexists_test.go @@ -3,10 +3,11 @@ 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 accf22f7e44..7766afd752a 100644 --- a/internal/service/ref/refname.go +++ b/internal/service/ref/refname.go @@ -6,11 +6,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" "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" ) // 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 497135a25ca..56dc03ec0c5 100644 --- a/internal/service/ref/refname_test.go +++ b/internal/service/ref/refname_test.go @@ -3,11 +3,12 @@ package ref import ( "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/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 90472318392..63cdec1b5d7 100644 --- a/internal/service/ref/refs.go +++ b/internal/service/ref/refs.go @@ -9,14 +9,15 @@ import ( "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" log "github.com/sirupsen/logrus" + "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/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/refs_test.go b/internal/service/ref/refs_test.go index f675c2c9a56..5bdce30bffd 100644 --- a/internal/service/ref/refs_test.go +++ b/internal/service/ref/refs_test.go @@ -9,12 +9,13 @@ import ( "github.com/golang/protobuf/ptypes/timestamp" "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/git/log" "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 containsRef(refs [][]byte, ref string) bool { diff --git a/internal/service/ref/remote_branches.go b/internal/service/ref/remote_branches.go index ef582663bd5..d4187326ffa 100644 --- a/internal/service/ref/remote_branches.go +++ b/internal/service/ref/remote_branches.go @@ -4,10 +4,11 @@ import ( "fmt" "strings" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" - "gitlab.com/gitlab-org/gitaly/internal/git/catfile" "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/catfile" ) func (s *server) FindAllRemoteBranches(req *gitalypb.FindAllRemoteBranchesRequest, stream gitalypb.RefService_FindAllRemoteBranchesServer) error { diff --git a/internal/service/ref/remote_branches_test.go b/internal/service/ref/remote_branches_test.go index efb4113426f..4147e02102c 100644 --- a/internal/service/ref/remote_branches_test.go +++ b/internal/service/ref/remote_branches_test.go @@ -5,11 +5,12 @@ 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/git/log" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" - "google.golang.org/grpc/codes" ) func TestSuccessfulFindAllRemoteBranchesRequest(t *testing.T) { diff --git a/internal/service/ref/tag_messages.go b/internal/service/ref/tag_messages.go index 574d2c859c9..349027e041f 100644 --- a/internal/service/ref/tag_messages.go +++ b/internal/service/ref/tag_messages.go @@ -3,10 +3,11 @@ package ref import ( "fmt" - "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/rubyserver" ) func (s *server) GetTagMessages(request *gitalypb.GetTagMessagesRequest, stream gitalypb.RefService_GetTagMessagesServer) error { diff --git a/internal/service/ref/tag_messages_test.go b/internal/service/ref/tag_messages_test.go index cb1b0117ed8..1ca17639346 100644 --- a/internal/service/ref/tag_messages_test.go +++ b/internal/service/ref/tag_messages_test.go @@ -6,10 +6,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/helper" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "google.golang.org/grpc/codes" ) func TestSuccessfulGetTagMessagesRequest(t *testing.T) { diff --git a/internal/service/ref/testhelper_test.go b/internal/service/ref/testhelper_test.go index 10cfa05e779..8bd8bf84f33 100644 --- a/internal/service/ref/testhelper_test.go +++ b/internal/service/ref/testhelper_test.go @@ -10,12 +10,13 @@ import ( "github.com/golang/protobuf/ptypes/timestamp" log "github.com/sirupsen/logrus" "github.com/stretchr/testify/require" + "google.golang.org/grpc" + "google.golang.org/grpc/reflection" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/helper/lines" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "google.golang.org/grpc" - "google.golang.org/grpc/reflection" ) var ( diff --git a/internal/service/ref/util.go b/internal/service/ref/util.go index f40221d47ad..53c977cc6ae 100644 --- a/internal/service/ref/util.go +++ b/internal/service/ref/util.go @@ -3,12 +3,13 @@ package ref import ( "bytes" + "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/catfile" "gitlab.com/gitlab-org/gitaly/internal/git/log" "gitlab.com/gitlab-org/gitaly/internal/helper/lines" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) var localBranchFormatFields = []string{"%(refname)", "%(objectname)"} diff --git a/internal/service/ref/util_test.go b/internal/service/ref/util_test.go index 331d2f57071..fc74e91cda2 100644 --- a/internal/service/ref/util_test.go +++ b/internal/service/ref/util_test.go @@ -5,6 +5,7 @@ import ( "github.com/golang/protobuf/ptypes/timestamp" "github.com/stretchr/testify/require" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" ) diff --git a/internal/service/register.go b/internal/service/register.go index 49190bc2ba9..77f4f644523 100644 --- a/internal/service/register.go +++ b/internal/service/register.go @@ -1,6 +1,10 @@ package service import ( + "google.golang.org/grpc" + "google.golang.org/grpc/health" + healthpb "google.golang.org/grpc/health/grpc_health_v1" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" "gitlab.com/gitlab-org/gitaly/internal/service/blob" @@ -17,9 +21,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" ) // RegisterAll will register all the known grpc services with diff --git a/internal/service/remote/fetch_internal_remote.go b/internal/service/remote/fetch_internal_remote.go index 15961aa2933..36e550b16c5 100644 --- a/internal/service/remote/fetch_internal_remote.go +++ b/internal/service/remote/fetch_internal_remote.go @@ -3,11 +3,12 @@ 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 22bfab29c76..b0766a9acc4 100644 --- a/internal/service/remote/fetch_internal_remote_test.go +++ b/internal/service/remote/fetch_internal_remote_test.go @@ -6,13 +6,14 @@ import ( "testing" "github.com/stretchr/testify/require" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "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" ) 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 56602be8df0..aac0527f2e5 100644 --- a/internal/service/remote/find_remote_root_ref.go +++ b/internal/service/remote/find_remote_root_ref.go @@ -4,11 +4,12 @@ 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/find_remote_root_ref_test.go b/internal/service/remote/find_remote_root_ref_test.go index a37a597e574..9ded98fdb5e 100644 --- a/internal/service/remote/find_remote_root_ref_test.go +++ b/internal/service/remote/find_remote_root_ref_test.go @@ -4,9 +4,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/testhelper" - "google.golang.org/grpc/codes" ) func TestFindRemoteRootRefSuccess(t *testing.T) { diff --git a/internal/service/remote/remotes.go b/internal/service/remote/remotes.go index 45fda5caa93..2e0a2c2d0ed 100644 --- a/internal/service/remote/remotes.go +++ b/internal/service/remote/remotes.go @@ -6,12 +6,13 @@ import ( "io/ioutil" "strings" - "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/git" + "gitlab.com/gitlab-org/gitaly/internal/rubyserver" ) // AddRemote adds a remote to the repository diff --git a/internal/service/remote/remotes_test.go b/internal/service/remote/remotes_test.go index b38f9398ea4..0b404ce3d12 100644 --- a/internal/service/remote/remotes_test.go +++ b/internal/service/remote/remotes_test.go @@ -9,10 +9,11 @@ import ( "testing" "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) func TestSuccessfulAddRemote(t *testing.T) { diff --git a/internal/service/remote/testhelper_test.go b/internal/service/remote/testhelper_test.go index 152c5b2bed2..9a729e178b9 100644 --- a/internal/service/remote/testhelper_test.go +++ b/internal/service/remote/testhelper_test.go @@ -7,11 +7,12 @@ import ( "testing" "time" + "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" ) var RubyServer *rubyserver.Server diff --git a/internal/service/remote/update_remote_mirror.go b/internal/service/remote/update_remote_mirror.go index a3544192839..d84b3b74f31 100644 --- a/internal/service/remote/update_remote_mirror.go +++ b/internal/service/remote/update_remote_mirror.go @@ -3,10 +3,11 @@ package remote import ( "fmt" - "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/rubyserver" ) func (s *server) UpdateRemoteMirror(stream gitalypb.RemoteService_UpdateRemoteMirrorServer) error { diff --git a/internal/service/remote/update_remote_mirror_test.go b/internal/service/remote/update_remote_mirror_test.go index e382dc5e0ce..79d6710f82b 100644 --- a/internal/service/remote/update_remote_mirror_test.go +++ b/internal/service/remote/update_remote_mirror_test.go @@ -5,10 +5,11 @@ import ( "testing" "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) func TestSuccessfulUpdateRemoteMirrorRequest(t *testing.T) { diff --git a/internal/service/repository/apply_gitattributes.go b/internal/service/repository/apply_gitattributes.go index e7103f03bfc..5ece5405de6 100644 --- a/internal/service/repository/apply_gitattributes.go +++ b/internal/service/repository/apply_gitattributes.go @@ -7,13 +7,14 @@ import ( "os" "path" + "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/git/catfile" "gitlab.com/gitlab-org/gitaly/internal/helper" - "golang.org/x/net/context" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) func applyGitattributes(c *catfile.Batch, repoPath string, revision []byte) error { diff --git a/internal/service/repository/apply_gitattributes_test.go b/internal/service/repository/apply_gitattributes_test.go index c51889d9278..eec00ac4e87 100644 --- a/internal/service/repository/apply_gitattributes_test.go +++ b/internal/service/repository/apply_gitattributes_test.go @@ -8,9 +8,10 @@ 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 TestApplyGitattributesSuccess(t *testing.T) { diff --git a/internal/service/repository/archive.go b/internal/service/repository/archive.go index 0b871226b0e..b32685cf6d1 100644 --- a/internal/service/repository/archive.go +++ b/internal/service/repository/archive.go @@ -5,12 +5,13 @@ 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/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 e0ba5ff9e35..4e130d331f4 100644 --- a/internal/service/repository/archive_test.go +++ b/internal/service/repository/archive_test.go @@ -7,10 +7,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/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.go b/internal/service/repository/backup_custom_hooks.go index ce4354f2a6f..053f496cd97 100644 --- a/internal/service/repository/backup_custom_hooks.go +++ b/internal/service/repository/backup_custom_hooks.go @@ -5,12 +5,13 @@ import ( "os/exec" "path" + "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/streamio" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) const customHooksDir = "custom_hooks" diff --git a/internal/service/repository/backup_custom_hooks_test.go b/internal/service/repository/backup_custom_hooks_test.go index 33816b823b8..ab61e652496 100644 --- a/internal/service/repository/backup_custom_hooks_test.go +++ b/internal/service/repository/backup_custom_hooks_test.go @@ -11,6 +11,7 @@ import ( "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" diff --git a/internal/service/repository/calculate_checksum.go b/internal/service/repository/calculate_checksum.go index d58a6627d75..d238084f8e3 100644 --- a/internal/service/repository/calculate_checksum.go +++ b/internal/service/repository/calculate_checksum.go @@ -9,13 +9,14 @@ import ( "regexp" "strings" + "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/git/alternates" "gitlab.com/gitlab-org/gitaly/internal/helper" - "golang.org/x/net/context" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) const blankChecksum = "0000000000000000000000000000000000000000" diff --git a/internal/service/repository/calculate_checksum_test.go b/internal/service/repository/calculate_checksum_test.go index 76f99902dbf..7816d1035c2 100644 --- a/internal/service/repository/calculate_checksum_test.go +++ b/internal/service/repository/calculate_checksum_test.go @@ -7,9 +7,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/testhelper" - "google.golang.org/grpc/codes" ) func TestSuccessfulCalculateChecksum(t *testing.T) { diff --git a/internal/service/repository/cleanup.go b/internal/service/repository/cleanup.go index 99fd9d34365..03cd50f6ca2 100644 --- a/internal/service/repository/cleanup.go +++ b/internal/service/repository/cleanup.go @@ -7,11 +7,12 @@ 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/cleanup_test.go b/internal/service/repository/cleanup_test.go index da88cce37c9..fa75ce31968 100644 --- a/internal/service/repository/cleanup_test.go +++ b/internal/service/repository/cleanup_test.go @@ -8,6 +8,7 @@ import ( "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" ) diff --git a/internal/service/repository/config.go b/internal/service/repository/config.go index 30314f43206..4d1e83f136c 100644 --- a/internal/service/repository/config.go +++ b/internal/service/repository/config.go @@ -1,13 +1,14 @@ package repository import ( + "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/git" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "golang.org/x/net/context" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) func (*server) DeleteConfig(ctx context.Context, req *gitalypb.DeleteConfigRequest) (*gitalypb.DeleteConfigResponse, error) { diff --git a/internal/service/repository/config_test.go b/internal/service/repository/config_test.go index b39c4c457dc..fa885805a77 100644 --- a/internal/service/repository/config_test.go +++ b/internal/service/repository/config_test.go @@ -7,10 +7,11 @@ import ( "testing" "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" "google.golang.org/grpc/status" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) func TestDeleteConfig(t *testing.T) { diff --git a/internal/service/repository/create.go b/internal/service/repository/create.go index 58928b166f2..1a70665a5aa 100644 --- a/internal/service/repository/create.go +++ b/internal/service/repository/create.go @@ -1,9 +1,10 @@ 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) CreateRepository(ctx context.Context, req *gitalypb.CreateRepositoryRequest) (*gitalypb.CreateRepositoryResponse, error) { diff --git a/internal/service/repository/create_bundle.go b/internal/service/repository/create_bundle.go index ee1fed758ed..8c63a94087f 100644 --- a/internal/service/repository/create_bundle.go +++ b/internal/service/repository/create_bundle.go @@ -3,11 +3,12 @@ package repository import ( "io" + "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/streamio" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) func (s *server) CreateBundle(req *gitalypb.CreateBundleRequest, stream gitalypb.RepositoryService_CreateBundleServer) error { diff --git a/internal/service/repository/create_bundle_test.go b/internal/service/repository/create_bundle_test.go index b0582c14e78..7504626708b 100644 --- a/internal/service/repository/create_bundle_test.go +++ b/internal/service/repository/create_bundle_test.go @@ -7,11 +7,12 @@ 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/tempdir" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "gitlab.com/gitlab-org/gitaly/streamio" - "google.golang.org/grpc/codes" ) func TestSuccessfulCreateBundleRequest(t *testing.T) { diff --git a/internal/service/repository/create_from_bundle.go b/internal/service/repository/create_from_bundle.go index dffb329c145..4f8200b7901 100644 --- a/internal/service/repository/create_from_bundle.go +++ b/internal/service/repository/create_from_bundle.go @@ -7,13 +7,14 @@ import ( "path" "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/tempdir" "gitlab.com/gitlab-org/gitaly/streamio" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) func (s *server) CreateRepositoryFromBundle(stream gitalypb.RepositoryService_CreateRepositoryFromBundleServer) error { diff --git a/internal/service/repository/create_from_bundle_test.go b/internal/service/repository/create_from_bundle_test.go index 7c8a2f3c490..4adec6ad135 100644 --- a/internal/service/repository/create_from_bundle_test.go +++ b/internal/service/repository/create_from_bundle_test.go @@ -8,13 +8,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "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" - "google.golang.org/grpc/codes" ) func TestSuccessfulCreateRepositoryFromBundleRequest(t *testing.T) { diff --git a/internal/service/repository/create_from_snapshot.go b/internal/service/repository/create_from_snapshot.go index 4d02bb1d09d..fd539c0bc84 100644 --- a/internal/service/repository/create_from_snapshot.go +++ b/internal/service/repository/create_from_snapshot.go @@ -7,13 +7,14 @@ 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 a308e0e9f89..1f1654e2caf 100644 --- a/internal/service/repository/create_from_snapshot_test.go +++ b/internal/service/repository/create_from_snapshot_test.go @@ -11,10 +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" - "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 7274bf7f02e..7a8a4cdc7d3 100644 --- a/internal/service/repository/create_from_url.go +++ b/internal/service/repository/create_from_url.go @@ -4,12 +4,13 @@ import ( "fmt" "os" - "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/git" + "gitlab.com/gitlab-org/gitaly/internal/helper" ) func (s *server) CreateRepositoryFromURL(ctx context.Context, req *gitalypb.CreateRepositoryFromURLRequest) (*gitalypb.CreateRepositoryFromURLResponse, error) { diff --git a/internal/service/repository/create_from_url_test.go b/internal/service/repository/create_from_url_test.go index c50aec953d6..a699550179c 100644 --- a/internal/service/repository/create_from_url_test.go +++ b/internal/service/repository/create_from_url_test.go @@ -7,10 +7,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/helper" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "google.golang.org/grpc/codes" ) func TestSuccessfulCreateRepositoryFromURLRequest(t *testing.T) { diff --git a/internal/service/repository/create_test.go b/internal/service/repository/create_test.go index 7a36c40f7fe..6a906180eab 100644 --- a/internal/service/repository/create_test.go +++ b/internal/service/repository/create_test.go @@ -7,11 +7,12 @@ 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/config" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "google.golang.org/grpc/codes" ) func TestCreateRepositorySuccess(t *testing.T) { diff --git a/internal/service/repository/fetch.go b/internal/service/repository/fetch.go index f0948889325..92e485a018e 100644 --- a/internal/service/repository/fetch.go +++ b/internal/service/repository/fetch.go @@ -1,9 +1,10 @@ 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) FetchSourceBranch(ctx context.Context, req *gitalypb.FetchSourceBranchRequest) (*gitalypb.FetchSourceBranchResponse, error) { diff --git a/internal/service/repository/fetch_remote.go b/internal/service/repository/fetch_remote.go index e6dfd9de1af..6527735a247 100644 --- a/internal/service/repository/fetch_remote.go +++ b/internal/service/repository/fetch_remote.go @@ -3,9 +3,10 @@ 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 2a8ee4f1b28..981624ac664 100644 --- a/internal/service/repository/fetch_remote_test.go +++ b/internal/service/repository/fetch_remote_test.go @@ -7,10 +7,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "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 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 a20160ad019..6cca2e5f06f 100644 --- a/internal/service/repository/fetch_test.go +++ b/internal/service/repository/fetch_test.go @@ -7,16 +7,17 @@ import ( "time" "github.com/stretchr/testify/require" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + healthpb "google.golang.org/grpc/health/grpc_health_v1" + "google.golang.org/grpc/metadata" + "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" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - healthpb "google.golang.org/grpc/health/grpc_health_v1" - "google.golang.org/grpc/metadata" ) func TestFetchSourceBranchSourceRepositorySuccess(t *testing.T) { diff --git a/internal/service/repository/fork.go b/internal/service/repository/fork.go index 3cfef77384b..edb5b70f468 100644 --- a/internal/service/repository/fork.go +++ b/internal/service/repository/fork.go @@ -6,13 +6,14 @@ import ( "path" "github.com/golang/protobuf/jsonpb" + "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/config" "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" ) const gitalyInternalURL = "ssh://gitaly/internal.git" diff --git a/internal/service/repository/fork_test.go b/internal/service/repository/fork_test.go index 813f0edffee..850063e01fd 100644 --- a/internal/service/repository/fork_test.go +++ b/internal/service/repository/fork_test.go @@ -7,12 +7,13 @@ import ( "testing" "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "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" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" ) func TestSuccessfulCreateForkRequest(t *testing.T) { diff --git a/internal/service/repository/fsck.go b/internal/service/repository/fsck.go index 2e4f4195e13..44ec145d275 100644 --- a/internal/service/repository/fsck.go +++ b/internal/service/repository/fsck.go @@ -3,10 +3,11 @@ package repository import ( "bytes" + "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/git/alternates" - "golang.org/x/net/context" ) func (s *server) Fsck(ctx context.Context, req *gitalypb.FsckRequest) (*gitalypb.FsckResponse, error) { diff --git a/internal/service/repository/fsck_test.go b/internal/service/repository/fsck_test.go index a1c6ca850d9..a52c4c04a00 100644 --- a/internal/service/repository/fsck_test.go +++ b/internal/service/repository/fsck_test.go @@ -8,6 +8,7 @@ import ( "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" ) diff --git a/internal/service/repository/gc.go b/internal/service/repository/gc.go index b6ac14e17c4..4e23d9a98e1 100644 --- a/internal/service/repository/gc.go +++ b/internal/service/repository/gc.go @@ -3,13 +3,14 @@ package repository import ( "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" log "github.com/sirupsen/logrus" + "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" "gitlab.com/gitlab-org/gitaly/internal/helper/housekeeping" - "golang.org/x/net/context" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) 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 d718c322912..15e5c97e356 100644 --- a/internal/service/repository/gc_test.go +++ b/internal/service/repository/gc_test.go @@ -12,9 +12,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "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" ) var ( diff --git a/internal/service/repository/info_attributes.go b/internal/service/repository/info_attributes.go index bbd42365207..c09779ea1c7 100644 --- a/internal/service/repository/info_attributes.go +++ b/internal/service/repository/info_attributes.go @@ -5,11 +5,12 @@ import ( "os" "path" + "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" "gitlab.com/gitlab-org/gitaly/streamio" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) func (s *server) GetInfoAttributes(in *gitalypb.GetInfoAttributesRequest, stream gitalypb.RepositoryService_GetInfoAttributesServer) error { diff --git a/internal/service/repository/info_attributes_test.go b/internal/service/repository/info_attributes_test.go index 4f55fc87f1e..bd30798c114 100644 --- a/internal/service/repository/info_attributes_test.go +++ b/internal/service/repository/info_attributes_test.go @@ -8,6 +8,7 @@ import ( "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" diff --git a/internal/service/repository/license.go b/internal/service/repository/license.go index 584cdba6b4e..9997d4e6431 100644 --- a/internal/service/repository/license.go +++ b/internal/service/repository/license.go @@ -1,9 +1,10 @@ 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 71f071de0c7..31a37e911ab 100644 --- a/internal/service/repository/license_test.go +++ b/internal/service/repository/license_test.go @@ -5,6 +5,7 @@ import ( "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" diff --git a/internal/service/repository/merge_base.go b/internal/service/repository/merge_base.go index 192a00c7cd4..523d06a52c0 100644 --- a/internal/service/repository/merge_base.go +++ b/internal/service/repository/merge_base.go @@ -4,11 +4,12 @@ import ( "io/ioutil" "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" ) func (s *server) FindMergeBase(ctx context.Context, req *gitalypb.FindMergeBaseRequest) (*gitalypb.FindMergeBaseResponse, error) { diff --git a/internal/service/repository/merge_base_test.go b/internal/service/repository/merge_base_test.go index 8e99e93105e..df188724d7e 100644 --- a/internal/service/repository/merge_base_test.go +++ b/internal/service/repository/merge_base_test.go @@ -4,9 +4,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/testhelper" - "google.golang.org/grpc/codes" ) func TestSuccessfulFindFindMergeBaseRequest(t *testing.T) { diff --git a/internal/service/repository/raw_changes.go b/internal/service/repository/raw_changes.go index 29fdc174398..94a34618966 100644 --- a/internal/service/repository/raw_changes.go +++ b/internal/service/repository/raw_changes.go @@ -1,10 +1,11 @@ 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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/rubyserver" ) func (s *server) GetRawChanges(req *gitalypb.GetRawChangesRequest, stream gitalypb.RepositoryService_GetRawChangesServer) error { diff --git a/internal/service/repository/raw_changes_test.go b/internal/service/repository/raw_changes_test.go index 5d1af5d86c2..4ab8c82f474 100644 --- a/internal/service/repository/raw_changes_test.go +++ b/internal/service/repository/raw_changes_test.go @@ -5,9 +5,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/testhelper" - "google.golang.org/grpc/codes" ) func TestGetRawChanges(t *testing.T) { diff --git a/internal/service/repository/rebase_in_progress.go b/internal/service/repository/rebase_in_progress.go index 2fff4d7f6f6..2f81e91a82f 100644 --- a/internal/service/repository/rebase_in_progress.go +++ b/internal/service/repository/rebase_in_progress.go @@ -7,12 +7,13 @@ import ( "strings" "time" - "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/helper" + "gitlab.com/gitlab-org/gitaly/internal/helper/housekeeping" ) const ( diff --git a/internal/service/repository/rebase_in_progress_test.go b/internal/service/repository/rebase_in_progress_test.go index 44d1bbe61fd..25cc0ed2e46 100644 --- a/internal/service/repository/rebase_in_progress_test.go +++ b/internal/service/repository/rebase_in_progress_test.go @@ -8,9 +8,10 @@ import ( "time" "github.com/stretchr/testify/require" + "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 TestSuccessfulIsRebaseInProgressRequest(t *testing.T) { diff --git a/internal/service/repository/repack.go b/internal/service/repository/repack.go index 3f031c0be07..9a5fca46f48 100644 --- a/internal/service/repository/repack.go +++ b/internal/service/repository/repack.go @@ -3,11 +3,12 @@ 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 b825aa6e685..ce13dafe110 100644 --- a/internal/service/repository/repack_test.go +++ b/internal/service/repository/repack_test.go @@ -8,9 +8,10 @@ import ( "time" "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 TestRepackIncrementalSuccess(t *testing.T) { diff --git a/internal/service/repository/repository.go b/internal/service/repository/repository.go index 2fb780f5daa..38ac363e293 100644 --- a/internal/service/repository/repository.go +++ b/internal/service/repository/repository.go @@ -3,12 +3,13 @@ package repository import ( "io/ioutil" - "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/git" + "gitlab.com/gitlab-org/gitaly/internal/helper" ) // Deprecated diff --git a/internal/service/repository/repository_test.go b/internal/service/repository/repository_test.go index 7d499829917..f504089d235 100644 --- a/internal/service/repository/repository_test.go +++ b/internal/service/repository/repository_test.go @@ -7,12 +7,13 @@ 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/config" "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 TestRepositoryExists(t *testing.T) { diff --git a/internal/service/repository/restore_custom_hooks.go b/internal/service/repository/restore_custom_hooks.go index d68a2df3b31..4ae2b5cd4b4 100644 --- a/internal/service/repository/restore_custom_hooks.go +++ b/internal/service/repository/restore_custom_hooks.go @@ -3,12 +3,13 @@ package repository import ( "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/internal/helper" "gitlab.com/gitlab-org/gitaly/streamio" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) func (s *server) RestoreCustomHooks(stream gitalypb.RepositoryService_RestoreCustomHooksServer) error { diff --git a/internal/service/repository/restore_custom_hooks_test.go b/internal/service/repository/restore_custom_hooks_test.go index 7b91c99b3c4..5a0fd0b96d8 100644 --- a/internal/service/repository/restore_custom_hooks_test.go +++ b/internal/service/repository/restore_custom_hooks_test.go @@ -7,11 +7,12 @@ 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/helper" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "gitlab.com/gitlab-org/gitaly/streamio" - "google.golang.org/grpc/codes" ) func TestSuccessfullRestoreCustomHooksRequest(t *testing.T) { diff --git a/internal/service/repository/search_files.go b/internal/service/repository/search_files.go index d48b2bb0e14..def8fa70206 100644 --- a/internal/service/repository/search_files.go +++ b/internal/service/repository/search_files.go @@ -4,12 +4,13 @@ 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/search_files_test.go b/internal/service/repository/search_files_test.go index ac34489355c..5b8d05393ca 100644 --- a/internal/service/repository/search_files_test.go +++ b/internal/service/repository/search_files_test.go @@ -6,9 +6,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/testhelper" - "google.golang.org/grpc/codes" ) var ( diff --git a/internal/service/repository/size.go b/internal/service/repository/size.go index e8c55c0b840..dff5c185dc4 100644 --- a/internal/service/repository/size.go +++ b/internal/service/repository/size.go @@ -8,10 +8,11 @@ import ( "strconv" "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" + "golang.org/x/net/context" + "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" ) func (s *server) RepositorySize(ctx context.Context, in *gitalypb.RepositorySizeRequest) (*gitalypb.RepositorySizeResponse, error) { diff --git a/internal/service/repository/size_test.go b/internal/service/repository/size_test.go index 6dc9a37b357..6cf3ab8be1a 100644 --- a/internal/service/repository/size_test.go +++ b/internal/service/repository/size_test.go @@ -6,11 +6,12 @@ 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/config" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" - "google.golang.org/grpc/codes" ) func TestSuccessfulRepositorySizeRequest(t *testing.T) { diff --git a/internal/service/repository/snapshot.go b/internal/service/repository/snapshot.go index 9c829b402c4..7197efee78d 100644 --- a/internal/service/repository/snapshot.go +++ b/internal/service/repository/snapshot.go @@ -3,12 +3,13 @@ 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 d60516a0b8b..16c41331d3c 100644 --- a/internal/service/repository/snapshot_test.go +++ b/internal/service/repository/snapshot_test.go @@ -11,11 +11,12 @@ 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 81b6441fd84..47ca399d607 100644 --- a/internal/service/repository/squash_in_progress.go +++ b/internal/service/repository/squash_in_progress.go @@ -4,11 +4,12 @@ import ( "fmt" "strings" - "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" ) const ( diff --git a/internal/service/repository/squash_in_progress_test.go b/internal/service/repository/squash_in_progress_test.go index 2e262130caf..11a8855454c 100644 --- a/internal/service/repository/squash_in_progress_test.go +++ b/internal/service/repository/squash_in_progress_test.go @@ -5,9 +5,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/testhelper" - "google.golang.org/grpc/codes" ) func TestSuccessfulIsSquashInProgressRequest(t *testing.T) { diff --git a/internal/service/repository/testhelper_test.go b/internal/service/repository/testhelper_test.go index 20a8b6ef5c2..941a19a617f 100644 --- a/internal/service/repository/testhelper_test.go +++ b/internal/service/repository/testhelper_test.go @@ -9,14 +9,15 @@ import ( "time" "github.com/stretchr/testify/assert" + "google.golang.org/grpc" + "google.golang.org/grpc/reflection" + "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" - "google.golang.org/grpc" - "google.golang.org/grpc/reflection" ) // Stamp taken from https://golang.org/pkg/time/#pkg-constants diff --git a/internal/service/repository/util.go b/internal/service/repository/util.go index f859358fc0b..4a207876714 100644 --- a/internal/service/repository/util.go +++ b/internal/service/repository/util.go @@ -3,9 +3,10 @@ package repository import ( "fmt" + "golang.org/x/net/context" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git" - "golang.org/x/net/context" ) func removeOriginInRepo(ctx context.Context, repository *gitalypb.Repository) error { diff --git a/internal/service/repository/write_config.go b/internal/service/repository/write_config.go index 0a6b3d27909..0e89e094943 100644 --- a/internal/service/repository/write_config.go +++ b/internal/service/repository/write_config.go @@ -1,9 +1,10 @@ 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_config_test.go b/internal/service/repository/write_config_test.go index 135025b500f..273785b42f9 100644 --- a/internal/service/repository/write_config_test.go +++ b/internal/service/repository/write_config_test.go @@ -5,9 +5,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/testhelper" - "google.golang.org/grpc/codes" ) func TestWriteConfigSuccessful(t *testing.T) { diff --git a/internal/service/repository/write_ref.go b/internal/service/repository/write_ref.go index a70c15490a7..6298840a3f4 100644 --- a/internal/service/repository/write_ref.go +++ b/internal/service/repository/write_ref.go @@ -4,12 +4,13 @@ import ( "bytes" "fmt" - "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/git" + "gitlab.com/gitlab-org/gitaly/internal/rubyserver" ) func (s *server) WriteRef(ctx context.Context, req *gitalypb.WriteRefRequest) (*gitalypb.WriteRefResponse, error) { diff --git a/internal/service/repository/write_ref_test.go b/internal/service/repository/write_ref_test.go index b8b8601a5bf..fd34f8f1e02 100644 --- a/internal/service/repository/write_ref_test.go +++ b/internal/service/repository/write_ref_test.go @@ -6,9 +6,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/testhelper" - "google.golang.org/grpc/codes" ) func TestWriteRefSuccessful(t *testing.T) { diff --git a/internal/service/server/info.go b/internal/service/server/info.go index 323014ab323..f21b370db8a 100644 --- a/internal/service/server/info.go +++ b/internal/service/server/info.go @@ -5,11 +5,12 @@ import ( "os" "path" + "golang.org/x/net/context" + "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/version" - "golang.org/x/net/context" ) func (s *server) ServerInfo(ctx context.Context, in *gitalypb.ServerInfoRequest) (*gitalypb.ServerInfoResponse, error) { diff --git a/internal/service/server/info_test.go b/internal/service/server/info_test.go index 5f10b0774d6..31cb759c130 100644 --- a/internal/service/server/info_test.go +++ b/internal/service/server/info_test.go @@ -6,6 +6,9 @@ import ( "time" "github.com/stretchr/testify/require" + "google.golang.org/grpc" + "google.golang.org/grpc/reflection" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" gitalyauth "gitlab.com/gitlab-org/gitaly/auth" "gitlab.com/gitlab-org/gitaly/internal/config" @@ -13,8 +16,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/server/auth" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "gitlab.com/gitlab-org/gitaly/internal/version" - "google.golang.org/grpc" - "google.golang.org/grpc/reflection" ) func TestGitalyServerInfo(t *testing.T) { diff --git a/internal/service/smarthttp/inforefs.go b/internal/service/smarthttp/inforefs.go index 1992ac040d1..72e0346b6e5 100644 --- a/internal/service/smarthttp/inforefs.go +++ b/internal/service/smarthttp/inforefs.go @@ -7,13 +7,14 @@ 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/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" ) func (s *server) InfoRefsUploadPack(in *gitalypb.InfoRefsRequest, stream gitalypb.SmartHTTPService_InfoRefsUploadPackServer) error { diff --git a/internal/service/smarthttp/inforefs_test.go b/internal/service/smarthttp/inforefs_test.go index e2ed888d4d4..ad92f0d49fb 100644 --- a/internal/service/smarthttp/inforefs_test.go +++ b/internal/service/smarthttp/inforefs_test.go @@ -8,13 +8,14 @@ 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/config" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "gitlab.com/gitlab-org/gitaly/streamio" - "golang.org/x/net/context" - "google.golang.org/grpc/codes" ) func TestSuccessfulInfoRefsUploadPack(t *testing.T) { diff --git a/internal/service/smarthttp/receive_pack.go b/internal/service/smarthttp/receive_pack.go index 040193aaf98..de71b8330f4 100644 --- a/internal/service/smarthttp/receive_pack.go +++ b/internal/service/smarthttp/receive_pack.go @@ -5,13 +5,14 @@ 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" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/streamio" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) func (s *server) PostReceivePack(stream gitalypb.SmartHTTPService_PostReceivePackServer) error { diff --git a/internal/service/smarthttp/receive_pack_test.go b/internal/service/smarthttp/receive_pack_test.go index dc6ffbbf5ef..ffd99f7289a 100644 --- a/internal/service/smarthttp/receive_pack_test.go +++ b/internal/service/smarthttp/receive_pack_test.go @@ -11,13 +11,14 @@ import ( "time" "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/config" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "gitlab.com/gitlab-org/gitaly/streamio" - "golang.org/x/net/context" - "google.golang.org/grpc/codes" ) func TestSuccessfulReceivePackRequest(t *testing.T) { diff --git a/internal/service/smarthttp/testhelper_test.go b/internal/service/smarthttp/testhelper_test.go index ee2642b2e61..678d3e1e72e 100644 --- a/internal/service/smarthttp/testhelper_test.go +++ b/internal/service/smarthttp/testhelper_test.go @@ -5,10 +5,11 @@ import ( "testing" "time" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" - "gitlab.com/gitlab-org/gitaly/internal/testhelper" "google.golang.org/grpc" "google.golang.org/grpc/reflection" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) const ( diff --git a/internal/service/smarthttp/upload_pack.go b/internal/service/smarthttp/upload_pack.go index 60872fcbdb7..a8a583f8722 100644 --- a/internal/service/smarthttp/upload_pack.go +++ b/internal/service/smarthttp/upload_pack.go @@ -4,13 +4,14 @@ import ( "io" "github.com/prometheus/client_golang/prometheus" + "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/helper" "gitlab.com/gitlab-org/gitaly/streamio" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) var ( diff --git a/internal/service/smarthttp/upload_pack_test.go b/internal/service/smarthttp/upload_pack_test.go index 3c44fcd4544..83bac8cefe8 100644 --- a/internal/service/smarthttp/upload_pack_test.go +++ b/internal/service/smarthttp/upload_pack_test.go @@ -13,6 +13,9 @@ import ( "github.com/stretchr/testify/assert" "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/config" "gitlab.com/gitlab-org/gitaly/internal/git" @@ -20,8 +23,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "gitlab.com/gitlab-org/gitaly/streamio" - "golang.org/x/net/context" - "google.golang.org/grpc/codes" ) const ( diff --git a/internal/service/ssh/receive_pack.go b/internal/service/ssh/receive_pack.go index 84decfe9c8c..71405623adb 100644 --- a/internal/service/ssh/receive_pack.go +++ b/internal/service/ssh/receive_pack.go @@ -5,13 +5,14 @@ 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" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/streamio" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) func (s *server) SSHReceivePack(stream gitalypb.SSHService_SSHReceivePackServer) error { diff --git a/internal/service/ssh/receive_pack_test.go b/internal/service/ssh/receive_pack_test.go index 37531c853ad..524bed78210 100644 --- a/internal/service/ssh/receive_pack_test.go +++ b/internal/service/ssh/receive_pack_test.go @@ -12,12 +12,13 @@ import ( "github.com/golang/protobuf/jsonpb" "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/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" ) func TestFailedReceivePackRequestDueToValidationError(t *testing.T) { diff --git a/internal/service/ssh/testhelper_test.go b/internal/service/ssh/testhelper_test.go index 68ced139c79..e61ee306c25 100644 --- a/internal/service/ssh/testhelper_test.go +++ b/internal/service/ssh/testhelper_test.go @@ -8,10 +8,11 @@ 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" "google.golang.org/grpc/reflection" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) const ( diff --git a/internal/service/ssh/upload_archive.go b/internal/service/ssh/upload_archive.go index c29ebf07b3b..fce759d7f65 100644 --- a/internal/service/ssh/upload_archive.go +++ b/internal/service/ssh/upload_archive.go @@ -1,13 +1,14 @@ package ssh import ( + "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/helper" "gitlab.com/gitlab-org/gitaly/streamio" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) func (s *server) SSHUploadArchive(stream gitalypb.SSHService_SSHUploadArchiveServer) error { diff --git a/internal/service/ssh/upload_archive_test.go b/internal/service/ssh/upload_archive_test.go index c639c003bc5..bf71445db51 100644 --- a/internal/service/ssh/upload_archive_test.go +++ b/internal/service/ssh/upload_archive_test.go @@ -8,10 +8,11 @@ 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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) func TestFailedUploadArchiveRequestDueToValidationError(t *testing.T) { diff --git a/internal/service/ssh/upload_pack.go b/internal/service/ssh/upload_pack.go index add35b0b371..7c39b47bf4c 100644 --- a/internal/service/ssh/upload_pack.go +++ b/internal/service/ssh/upload_pack.go @@ -1,13 +1,14 @@ package ssh import ( + "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/helper" "gitlab.com/gitlab-org/gitaly/streamio" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) func (s *server) SSHUploadPack(stream gitalypb.SSHService_SSHUploadPackServer) error { diff --git a/internal/service/ssh/upload_pack_test.go b/internal/service/ssh/upload_pack_test.go index d62734e2f48..87d1a03d940 100644 --- a/internal/service/ssh/upload_pack_test.go +++ b/internal/service/ssh/upload_pack_test.go @@ -11,12 +11,13 @@ import ( "github.com/golang/protobuf/jsonpb" "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/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" ) func TestFailedUploadPackRequestDueToValidationError(t *testing.T) { diff --git a/internal/service/storage/deleteall.go b/internal/service/storage/deleteall.go index 25c53c73d3a..e530e591f55 100644 --- a/internal/service/storage/deleteall.go +++ b/internal/service/storage/deleteall.go @@ -7,12 +7,13 @@ 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/helper" - "gitlab.com/gitlab-org/gitaly/internal/tempdir" "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" + "gitlab.com/gitlab-org/gitaly/internal/tempdir" ) func (s *server) DeleteAllRepositories(ctx context.Context, req *gitalypb.DeleteAllRepositoriesRequest) (*gitalypb.DeleteAllRepositoriesResponse, error) { diff --git a/internal/service/storage/deleteall_test.go b/internal/service/storage/deleteall_test.go index d8b8b3ccb80..03dbbaf0d3a 100644 --- a/internal/service/storage/deleteall_test.go +++ b/internal/service/storage/deleteall_test.go @@ -9,12 +9,13 @@ import ( "testing" "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/config" "gitlab.com/gitlab-org/gitaly/internal/tempdir" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) func TestDeleteAllSuccess(t *testing.T) { diff --git a/internal/service/storage/listdirectories.go b/internal/service/storage/listdirectories.go index 43b85fcb5a6..aea65d2c7f9 100644 --- a/internal/service/storage/listdirectories.go +++ b/internal/service/storage/listdirectories.go @@ -5,10 +5,11 @@ import ( "path/filepath" "strings" - "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" - "gitlab.com/gitlab-org/gitaly/internal/helper" "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" ) func (s *server) ListDirectories(req *gitalypb.ListDirectoriesRequest, stream gitalypb.StorageService_ListDirectoriesServer) error { diff --git a/internal/service/storage/listdirectories_test.go b/internal/service/storage/listdirectories_test.go index 4e827e988c6..beb64c47d93 100644 --- a/internal/service/storage/listdirectories_test.go +++ b/internal/service/storage/listdirectories_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/assert" "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" diff --git a/internal/service/storage/testhelper_test.go b/internal/service/storage/testhelper_test.go index aeb405ca6a5..6890e898164 100644 --- a/internal/service/storage/testhelper_test.go +++ b/internal/service/storage/testhelper_test.go @@ -7,11 +7,12 @@ import ( "testing" "time" + "google.golang.org/grpc" + "google.golang.org/grpc/reflection" + "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" ) var testStorage config.Storage diff --git a/internal/service/wiki/delete_page.go b/internal/service/wiki/delete_page.go index cd1ecbaff61..449e319f2d4 100644 --- a/internal/service/wiki/delete_page.go +++ b/internal/service/wiki/delete_page.go @@ -3,11 +3,12 @@ package wiki 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" ) func (s *server) WikiDeletePage(ctx context.Context, request *gitalypb.WikiDeletePageRequest) (*gitalypb.WikiDeletePageResponse, error) { diff --git a/internal/service/wiki/delete_page_test.go b/internal/service/wiki/delete_page_test.go index 85e8879bbc1..c9fbb45430a 100644 --- a/internal/service/wiki/delete_page_test.go +++ b/internal/service/wiki/delete_page_test.go @@ -4,10 +4,11 @@ import ( "testing" "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" gitlog "gitlab.com/gitlab-org/gitaly/internal/git/log" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "google.golang.org/grpc/codes" ) func TestSuccessfulWikiDeletePageRequest(t *testing.T) { diff --git a/internal/service/wiki/find_file.go b/internal/service/wiki/find_file.go index c05598c9245..87f9a5e16a4 100644 --- a/internal/service/wiki/find_file.go +++ b/internal/service/wiki/find_file.go @@ -1,10 +1,11 @@ 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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/rubyserver" ) func (s *server) WikiFindFile(request *gitalypb.WikiFindFileRequest, stream gitalypb.WikiService_WikiFindFileServer) error { diff --git a/internal/service/wiki/find_file_test.go b/internal/service/wiki/find_file_test.go index 72dd58676a5..df619055df7 100644 --- a/internal/service/wiki/find_file_test.go +++ b/internal/service/wiki/find_file_test.go @@ -9,9 +9,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/testhelper" - "google.golang.org/grpc/codes" ) func TestSuccessfulWikiFindFileRequest(t *testing.T) { diff --git a/internal/service/wiki/find_page.go b/internal/service/wiki/find_page.go index 290e92ce597..6d5d32b2f5a 100644 --- a/internal/service/wiki/find_page.go +++ b/internal/service/wiki/find_page.go @@ -1,10 +1,11 @@ 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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/rubyserver" ) func (s *server) WikiFindPage(request *gitalypb.WikiFindPageRequest, stream gitalypb.WikiService_WikiFindPageServer) error { diff --git a/internal/service/wiki/find_page_test.go b/internal/service/wiki/find_page_test.go index e0c23cbb4a8..6535b7fca54 100644 --- a/internal/service/wiki/find_page_test.go +++ b/internal/service/wiki/find_page_test.go @@ -5,9 +5,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/testhelper" - "google.golang.org/grpc/codes" ) func TestSuccessfulWikiFindPageRequest(t *testing.T) { diff --git a/internal/service/wiki/formatted_data.go b/internal/service/wiki/formatted_data.go index 12b2f11f6f8..97e635fe483 100644 --- a/internal/service/wiki/formatted_data.go +++ b/internal/service/wiki/formatted_data.go @@ -1,10 +1,11 @@ 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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/rubyserver" ) func (s *server) WikiGetFormattedData(request *gitalypb.WikiGetFormattedDataRequest, stream gitalypb.WikiService_WikiGetFormattedDataServer) error { diff --git a/internal/service/wiki/formatted_data_test.go b/internal/service/wiki/formatted_data_test.go index 2047fe26118..7f17c115fdd 100644 --- a/internal/service/wiki/formatted_data_test.go +++ b/internal/service/wiki/formatted_data_test.go @@ -6,9 +6,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/testhelper" - "google.golang.org/grpc/codes" ) func TestSuccessfulWikiGetFormattedDataRequest(t *testing.T) { diff --git a/internal/service/wiki/get_all_pages_test.go b/internal/service/wiki/get_all_pages_test.go index 5162b530cfc..8cfe57fa12b 100644 --- a/internal/service/wiki/get_all_pages_test.go +++ b/internal/service/wiki/get_all_pages_test.go @@ -5,9 +5,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/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 2925c6f0711..6f0d710f978 100644 --- a/internal/service/wiki/get_page_versions.go +++ b/internal/service/wiki/get_page_versions.go @@ -1,10 +1,11 @@ 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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/rubyserver" ) func (s *server) WikiGetPageVersions(request *gitalypb.WikiGetPageVersionsRequest, stream gitalypb.WikiService_WikiGetPageVersionsServer) error { diff --git a/internal/service/wiki/get_page_versions_test.go b/internal/service/wiki/get_page_versions_test.go index aafdf6e6907..41467959aed 100644 --- a/internal/service/wiki/get_page_versions_test.go +++ b/internal/service/wiki/get_page_versions_test.go @@ -8,6 +8,7 @@ import ( "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" ) diff --git a/internal/service/wiki/testhelper_test.go b/internal/service/wiki/testhelper_test.go index c67da56093f..309adff4046 100644 --- a/internal/service/wiki/testhelper_test.go +++ b/internal/service/wiki/testhelper_test.go @@ -11,13 +11,14 @@ import ( log "github.com/sirupsen/logrus" "github.com/stretchr/testify/require" + "google.golang.org/grpc" + "google.golang.org/grpc/reflection" + "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" - "google.golang.org/grpc" - "google.golang.org/grpc/reflection" ) type createWikiPageOpts struct { diff --git a/internal/service/wiki/update_page.go b/internal/service/wiki/update_page.go index 5c665a1bbfc..15dbde8663c 100644 --- a/internal/service/wiki/update_page.go +++ b/internal/service/wiki/update_page.go @@ -3,10 +3,11 @@ package wiki import ( "fmt" - "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/rubyserver" ) func (s *server) WikiUpdatePage(stream gitalypb.WikiService_WikiUpdatePageServer) error { diff --git a/internal/service/wiki/update_page_test.go b/internal/service/wiki/update_page_test.go index 696b7d84e88..f65274fb509 100644 --- a/internal/service/wiki/update_page_test.go +++ b/internal/service/wiki/update_page_test.go @@ -5,10 +5,11 @@ import ( "testing" "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" gitlog "gitlab.com/gitlab-org/gitaly/internal/git/log" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "google.golang.org/grpc/codes" ) func TestSuccessfulWikiUpdatePageRequest(t *testing.T) { diff --git a/internal/service/wiki/write_page.go b/internal/service/wiki/write_page.go index 635fd8033e0..020fdebc66d 100644 --- a/internal/service/wiki/write_page.go +++ b/internal/service/wiki/write_page.go @@ -3,10 +3,11 @@ package wiki import ( "fmt" - "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" + + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" + "gitlab.com/gitlab-org/gitaly/internal/rubyserver" ) func (s *server) WikiWritePage(stream gitalypb.WikiService_WikiWritePageServer) error { diff --git a/internal/service/wiki/write_page_test.go b/internal/service/wiki/write_page_test.go index 04620d61278..284f2fce858 100644 --- a/internal/service/wiki/write_page_test.go +++ b/internal/service/wiki/write_page_test.go @@ -5,10 +5,11 @@ import ( "testing" "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" gitlog "gitlab.com/gitlab-org/gitaly/internal/git/log" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "google.golang.org/grpc/codes" ) func TestSuccessfulWikiWritePageRequest(t *testing.T) { diff --git a/internal/supervisor/supervisor_test.go b/internal/supervisor/supervisor_test.go index c56e5fb3ebe..5c33062ac80 100644 --- a/internal/supervisor/supervisor_test.go +++ b/internal/supervisor/supervisor_test.go @@ -15,6 +15,7 @@ import ( "time" "github.com/stretchr/testify/require" + "gitlab.com/gitlab-org/gitaly/internal/testhelper" ) diff --git a/internal/tempdir/tempdir.go b/internal/tempdir/tempdir.go index faa0bc0b080..d3dd69162f0 100644 --- a/internal/tempdir/tempdir.go +++ b/internal/tempdir/tempdir.go @@ -10,6 +10,7 @@ import ( "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" diff --git a/internal/tempdir/tempdir_test.go b/internal/tempdir/tempdir_test.go index ef09b7e251a..d98daafd2e4 100644 --- a/internal/tempdir/tempdir_test.go +++ b/internal/tempdir/tempdir_test.go @@ -8,6 +8,7 @@ import ( "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" diff --git a/internal/testhelper/testhelper.go b/internal/testhelper/testhelper.go index 1d470c61a06..061363b1d15 100644 --- a/internal/testhelper/testhelper.go +++ b/internal/testhelper/testhelper.go @@ -23,14 +23,15 @@ import ( 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" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" "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/config" + "gitlab.com/gitlab-org/gitaly/internal/storage" ) // TestRelativePath is the path inside its storage of the gitlab-test repo -- GitLab