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 e5f8b5ca06..33d056f94d 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 767b392e5c..9945814fd2 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 2459519b3e..d455f60b8d 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 08372c5fcb..95473c2c6d 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 0481741332..a8f7d6050e 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 7008ee19a0..6871c3d21a 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 c7fa7356e3..6a065cffa0 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 cd3a26d836..599481fc73 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 9bacea720f..79389f7204 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 bcd634ffe2..735d4a227c 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 2d8936f9af..1577bffe8c 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 f67169b831..00da806d55 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 c712b33a6a..7848c43513 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 9dc3356eee..372319cc0d 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 386f1d2b04..ac12b8c496 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 0ded22414d..9b33afd248 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 b3144acedd..3f3370c58d 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 872b5b2bd9..91a8f1c728 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 5397b2fcae..79cb80d696 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 ca2c43cc27..6317e34f69 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 5405421ce3..bc39d38912 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 d0f229e0e9..ed8540e7e0 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 aac91d866d..9269db6d87 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 ee5e24b106..27f393be7e 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 40eff4f018..81f0b36299 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 9cabc28408..696ca4596f 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 5deff9e0d4..6d16500c52 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 e82311513e..c7d7830090 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 5d513b85d7..5c6c7ad322 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 98fe4bc2fb..612b6b4e8e 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 5b804c061d..a096a8280f 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 46e935ca9c..8c7c27c346 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 68eddd548d..8d7a266d71 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 4dd44ae8fb..75768645aa 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 5b0599b74c..ad86e792af 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 33fb6eb925..87fb6a4519 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 b50445a84f..6741d22315 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 3abcceaeb8..0a181a93dd 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 0069ec778a..f518d0d918 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 4f5bb7a37c..3c31096e5a 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 4bb70ee5fb..40c8c343e0 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 85b0ca23d0..925dd1a5e4 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 e83fe3504c..0f9dedd5ec 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 3dedf32afb..89324df647 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 19a7bc5344..f6044838bc 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 be761556e6..b3df8a2855 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 8f6fdd1cc8..80d7272558 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 7d041ae941..3168cce003 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 48bda10076..22fb3e99a3 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 d6982a7afc..896e55a088 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 69640cda54..ec8119bc67 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 a1a06fbdbe..2e660ca68f 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 ca183c3efa..b8ca23f3f9 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 83b0790703..78bfec02a8 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 1b4a96b325..fdc321c541 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 ec0acae174..98f37e52c0 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 786fde75f1..543218a408 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 6e879169b4..e0854156a5 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 dbda54e657..138db94d2d 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 e6fc1049d1..e9f79b5ccd 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 e1e696b52b..1ffac64dca 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 a0a474e9fc..ea7fc1ac6a 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 bdf8e35b27..4994e0ab89 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 6aa4d72982..20fae44f45 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 4027414e7e..35d53a3eaa 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 88be2ec0f8..869f8db953 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 1d958ef976..baa4f44c87 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 052de5bf9e..5c15056a2b 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 2d82a7712d..9a7ae5890a 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 9cf65f39c8..91986cb6f7 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 33232e9868..79e9906171 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 2c994c9e20..f3d2be8a0f 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 96d108a657..e1d5f1d494 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 d1eb82112a..fd275ee9e8 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 60d9c0952c..c145bd0dfd 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 ed7e30dd5b..c8147c08b7 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 7b00475e54..2c82fb2f9d 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 034176c83e..8967c9745c 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 30605c8086..e8dc33fae8 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 f9c7e847a1..93cbb67d05 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 4747082cc6..f5f79d4a4e 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 37b755e9b3..bde45fe398 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 48a81a484a..f8d3100194 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 0b054803d9..5c3e9218ee 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 5d9a34f136..33b681a9fb 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 0664feeb8f..bd7155b9c5 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 1570535aac..add1b94a8d 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 72416953af..156dc603a4 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 02c593c683..d633c23d80 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 e582980962..df31c839fd 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 5037d47dbc..6b3401052d 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 6c0feb938f..f6bec20fd0 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 f6a1aecce5..d7e9814d68 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 cb38d17e8e..1bdec3a0b0 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 dbe75c4f57..b849edfe92 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 73fde92e5a..549d1767b2 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 e775d48dd5..f8efefbb97 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 29a3704293..8ebad69431 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 ef8abffe04..6d49342a59 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 f5ac3471f0..c8413b3169 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 3e08713d0c..e930fe65be 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 9a8840dede..b13830f109 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 ab6d8e5d59..e7d00da901 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 eaea555586..a009db64ad 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 6326419ca7..fb6dcf1e84 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 e9496d1af1..b4463c4a03 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 ec76bad83d..17e65da616 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 2e9470f5a7..34c096e609 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 1fdea95dba..12491d3f93 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 1fa5ea3419..97b8c704c5 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 18fca0c688..79c8568173 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 2c501c4493..c58ffc49d7 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 340fb6416a..08319fd4b4 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 8e007f6937..a62068f381 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 29d13183c7..01a7d137c3 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 09827d81ae..08f0ea1fb8 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 385711a110..15491d8ed1 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 a000798689..abbe7aa75f 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 6cc0aac1ff..5bb025cfdd 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 6d03816f7a..655b21de45 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 104ff21a70..de79379628 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 27d9f92112..4671adeec5 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 a87318cf06..ea65c2a3c1 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 ff3dcd3a94..53acd16d50 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 7ad96f26ee..eb8a2a142f 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 4fb50c6f6d..4aed597198 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 2bc13b3abd..6e4d2d0b19 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 819ff656a8..3bbaf68987 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 44fa71d93c..69e4bdf44e 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 accf22f7e4..7766afd752 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 497135a25c..56dc03ec0c 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 9047231839..63cdec1b5d 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 f675c2c9a5..5bdce30bff 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 ef582663bd..d4187326ff 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 efb4113426..4147e02102 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 574d2c859c..349027e041 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 cb1b0117ed..1ca1763934 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 10cfa05e77..8bd8bf84f3 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 f40221d47a..53c977cc6a 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 331d2f5707..fc74e91cda 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 49190bc2ba..77f4f64452 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 15961aa293..36e550b16c 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 22bfab29c7..b0766a9acc 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 56602be8df..aac0527f2e 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 a37a597e57..9ded98fdb5 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 45fda5caa9..2e0a2c2d0e 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 b38f9398ea..0b404ce3d1 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 152c5b2bed..9a729e178b 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 a354419283..d84b3b74f3 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 e382dc5e0c..79d6710f82 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 e7103f03bf..5ece5405de 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 c51889d927..eec00ac4e8 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 0b871226b0..b32685cf6d 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 e0ba5ff9e3..4e130d331f 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 ce4354f2a6..053f496cd9 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 33816b823b..ab61e65249 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 d58a6627d7..d238084f8e 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 76f99902db..7816d1035c 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 99fd9d3436..03cd50f6ca 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 da88cce37c..fa75ce3196 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 30314f4320..4d1e83f136 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 b39c4c457d..fa885805a7 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 58928b166f..1a70665a5a 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 ee1fed758e..8c63a94087 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 b0582c14e7..7504626708 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 dffb329c14..4f8200b790 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 7c8a2f3c49..4adec6ad13 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 4d02bb1d09..fd539c0bc8 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 a308e0e9f8..1f1654e2ca 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 7274bf7f02..7a8a4cdc7d 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 c50aec953d..a699550179 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 7a36c40f7f..6a906180ea 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 f094888932..92e485a018 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 e6dfd9de1a..6527735a24 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 2a8ee4f1b2..981624ac66 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 a20160ad01..6cca2e5f06 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 3cfef77384..edb5b70f46 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 813f0edffe..850063e01f 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 2e4f4195e1..44ec145d27 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 a1c6ca850d..a52c4c04a0 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 b6ac14e17c..4e23d9a98e 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 d718c32291..15e5c97e35 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 bbd4236520..c09779ea1c 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 4f55fc87f1..bd30798c11 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 584cdba6b4..9997d4e643 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 71f071de0c..31a37e911a 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 192a00c7cd..523d06a52c 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 8e99e93105..df188724d7 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 29fdc17439..94a3461896 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 5d1af5d86c..4ab8c82f47 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 2fff4d7f6f..2f81e91a82 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 44d1bbe61f..25cc0ed2e4 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 3f031c0be0..9a5fca46f4 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 b825aa6e68..ce13dafe11 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 2fb780f5da..38ac363e29 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 7d49982991..f504089d23 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 d68a2df3b3..4ae2b5cd4b 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 7b91c99b3c..5a0fd0b96d 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 d48b2bb0e1..def8fa7020 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 ac34489355..5b8d05393c 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 e8c55c0b84..dff5c185dc 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 6dc9a37b35..6cf3ab8be1 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 9c829b402c..7197efee78 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 d60516a0b8..16c41331d3 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 81b6441fd8..47ca399d60 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 2e262130ca..11a8855454 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 20a8b6ef5c..941a19a617 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 f859358fc0..4a20787671 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 0a6b3d2790..0e89e09494 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 135025b500..273785b42f 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 a70c15490a..6298840a3f 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 b8b8601a5b..fd34f8f1e0 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 323014ab32..f21b370db8 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 5f10b0774d..31cb759c13 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 1992ac040d..72e0346b6e 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 e2ed888d4d..ad92f0d49f 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 040193aaf9..de71b8330f 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 dc6ffbbf5e..ffd99f7289 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 ee2642b2e6..678d3e1e72 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 60872fcbdb..a8a583f872 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 3c44fcd454..83bac8cefe 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 84decfe9c8..71405623ad 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 37531c853a..524bed7821 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 68ced139c7..e61ee306c2 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 c29ebf07b3..fce759d7f6 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 c639c003bc..bf71445db5 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 add35b0b37..7c39b47bf4 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 d62734e2f4..87d1a03d94 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 25c53c73d3..e530e591f5 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 d8b8b3ccb8..03dbbaf0d3 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 43b85fcb5a..aea65d2c7f 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 4e827e988c..beb64c47d9 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 aeb405ca6a..6890e89816 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 cd1ecbaff6..449e319f2d 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 85e8879bbc..c9fbb45430 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 c05598c924..87f9a5e16a 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 72dd58676a..df619055df 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 290e92ce59..6d5d32b2f5 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 e0c23cbb4a..6535b7fca5 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 12b2f11f6f..97e635fe48 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 2047fe2611..7f17c115fd 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 5162b530cf..8cfe57fa12 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 2925c6f071..6f0d710f97 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 aafdf6e690..41467959ae 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 c67da56093..309adff404 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 5c665a1bbf..15dbde8663 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 696b7d84e8..f65274fb50 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 635fd8033e..020fdebc66 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 04620d6127..284f2fce85 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 c56e5fb3eb..5c33062ac8 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 faa0bc0b08..d3dd69162f 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 ef09b7e251..d98daafd2e 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 1d470c61a0..061363b1d1 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