diff --git a/_support/makegen.go b/_support/makegen.go index e5f8b5ca06c6032e1531e770f493cbff2a98f2a6..33d056f94d5f9e9fdf01f23985675a9f3bc1a177 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 767b392e5c5ea888d2abc5527c99c90932525d0c..9945814fd221deb84fd5bfc705a2b572caad822d 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 2459519b3ee3428b65770ddbf5402e90b0861802..d455f60b8d286f3d1d6676e8836b20c62262c3d9 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 08372c5fcb563e213e580c5ebfb31734991de2ee..95473c2c6dbd3c0c267efa8b4ed5d2c80e33a105 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 0481741332edf9aeca816caac237a35fffe98f56..a8f7d6050ebf30ad31cbd9b069281ce6a87eacb8 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 7008ee19a0b88d22cf170afe4677b941b3f3286b..6871c3d21ae26a032fcacdff7f5e30990de4a682 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 c7fa7356e32f02212dbc19c30f90eabfb7be3280..6a065cffa02f5a50e164f473bf67105fff07e63b 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 cd3a26d8360b279095b664dd46256d465936bf15..599481fc731e8707e08d59db4adf6fa371fd0a8d 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 9bacea720f4a88f481ddfa0b37219d93ceb274cd..79389f72042795887f53ebcbdf6c4d808024ed53 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 bcd634ffe2e9c96001914d1b595113090d747cae..735d4a227c528a28742ac5da09441580f75a5090 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 2d8936f9afbdfb895dc56cccda81375943303ba9..1577bffe8cca77fab38800c0e29ab73e74211797 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 f67169b831bc8e95d8635a6a83cf92624363cb25..00da806d5597655189b95773c4f5b87c1e6c77a7 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 c712b33a6a255606163374c014d97c5cd8c8250c..7848c435137269e72149e1d759b824033c539307 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 9dc3356eee8d32766c638652907c8c3c80165d39..372319cc0de5ccb085650b5350268b9194043a2d 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 386f1d2b045642443ba91371d9dac525b88537e6..ac12b8c496a6e155312b0487e3ba296e1331372b 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 0ded22414d9a3d8e2dd3bb03c31de94bed6e885c..9b33afd248d9845b4bb666344bc82c0f96873c48 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 b3144aceddcaacec094d6097dc63fcb412e266a7..3f3370c58de02e71da483fe680a3370afc3a5ea4 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 872b5b2bd9ed5b53b57dd1c7eb7ce09333331079..91a8f1c728ce085c7b1304d65cec947fedccb735 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 5397b2fcaee1c443308c93d2b4fec9712d55b74d..79cb80d696bfe0735199c03ce6007fafdf407410 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 ca2c43cc27afec21d25ec5ff330b67e24c8ed260..6317e34f6927270436edb1f9c993f21fad49fa3c 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 5405421ce3893b6083584d11637626bc007c91ec..bc39d389127a47cdaf072f82b076e70cab2c7ef8 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 d0f229e0e9e2c33f8ac240b60463f2feafe69811..ed8540e7e0c78e4ef301382ca66896cd7c638cdf 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 aac91d866d0991e85b0feeeffbc082628be307c1..9269db6d8719545cb8b1a741c1a897c8fc4dd934 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 ee5e24b1068f0af94cf52a1f559b6ac7ac5b5d77..27f393be7e29babf829f87e4192e0183378794e4 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 40eff4f018879bc42e3eb6113d36a57d8c284176..81f0b362996618cee36a6bfb0528ff0a88da938b 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 9cabc2840804a9f617c7b10294cd065a0dc5e880..696ca4596f88d1dd155de5fe216f45cb5b44a8bf 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 5deff9e0d4f916cba4cc05657392ce9989696b27..6d16500c52490d7fc5267bcb54f2113f4ffc9335 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 e82311513e594424b1714bd497833ff253ed3960..c7d7830090c3648f3f607d922c74fa291e97636a 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 5d513b85d72cce510879a2f69c2cec749c773e13..5c6c7ad3227c269900770c565147fe34b551a5f8 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 98fe4bc2fb7cc0b103a2caa0a8cb8d0be5cf5abe..612b6b4e8e5c6d33eab12fcac852b3a55a9b9165 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 5b804c061d21763191bff7d9292ed88bf9d59bc3..a096a8280f3f5bcc090cb10668a560bdd41560f1 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 46e935ca9ca6078c9b43fe660ed405357a031eb1..8c7c27c346e0c1bf2143758cc797d4e0406ed700 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 68eddd548ddb16d51fed01573a087d0ecc9baf01..8d7a266d710a09cc6055bb40b1b7e8aef07f9a9f 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 4dd44ae8fb149d7a2890f970541833f201c6659c..75768645aa9b03463fa6b9601117337b6f8ed75f 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 5b0599b74cd85651d75a3501d1c3a177a475742b..ad86e792af207b4145a8d7df742bee7a0236fce0 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 33fb6eb925f4d8978f1bc6b8271c998ea41dbbda..87fb6a451945183351d6b468e1b1f2162bb686e0 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 b50445a84fab90758228f9daa041ec8930c015ca..6741d223158d42046ee533de2f6c321c1827c860 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 3abcceaeb82db1ab55450cbb3d4e7fb293db5fca..0a181a93dd2789aafc79b0185d3f7a1a718e4571 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 0069ec778abbbca77dc1094d8b455bb65629da0f..f518d0d918daefc0f865641d755ddcfeb939d172 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 4f5bb7a37c6acec3ba7167e7c660b20ce62215b0..3c31096e5a1d6e7e137a3fe3465434d47585b0f0 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 4bb70ee5fbb7c04a9fe215d87a84212fba46914c..40c8c343e0de4bb88d392d42977173dfb8cea979 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 85b0ca23d0c92281ec948e386f2d4e3615133cd7..925dd1a5e4ab856387de811a0d2f1139085eb655 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 e83fe3504ca224e78ae28a034e4999735d201a14..0f9dedd5eca2211c4f8d884801d76deddd086b7e 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 3dedf32afb997920b5a0e2395dc06e2281462d9e..89324df64748e3a4a2f1601331253e3c2a6d8b92 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 19a7bc53446bb187286853c2a54c54083ecad7fe..f6044838bc27230b430b640119197a7993f17d04 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 be761556e623bba4d6594cb8b4ca90c3f574c61b..b3df8a2855e8cb7645f93361cf156a180107a643 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 8f6fdd1cc8c67a7f7b558594d7e127512c86bead..80d7272558bebbbd876813c20d1c16a0c17a3f67 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 7d041ae941aef44adf7937b6d08567a8dc0a431a..3168cce003d00fc5206ed3d1d043c3204fc5633e 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 48bda100769609bcf1e5b7b4cc95541b5845a189..22fb3e99a340bf45c5a9b3871e5918423ae37dda 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 d6982a7afc98975e3580f7e24bb6c7980809c660..896e55a0883b79c0dd6ae93e871aad1318b7ec91 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 69640cda5416fd167476f7ad341f9aa6d0a0dc43..ec8119bc6781cb98568a03e9a64505c8e418e30f 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 a1a06fbdbeb932b046af623f98ec37c2fa8fca9e..2e660ca68f1e160555aa249bfce89415fbc5917c 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 ca183c3efa62e8084d62fbcf60a49ceca6898598..b8ca23f3f9831352d67977669d8f0c4d19258a6e 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 83b07907030e1cf9f1c22aca2e711aa0c27fce9e..78bfec02a8fc0212b3d6a8fbf20236c9c7c5d383 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 1b4a96b3257406246798858aa89d4b18d9badecd..fdc321c541b1e86b88f0856c3f6c0a300856f52b 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 ec0acae174c6eb93c025933ce77719e2b4ca2b29..98f37e52c02e84170b375c4583b5cf56a43ed63f 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 786fde75f1a34fb587afbe3d329b8706bf513267..543218a408c7ae62b204d30c0772c17222521044 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 6e879169b4733fb9464b4f6428ec6ec3a8298952..e0854156a5eea2616e03d3b3f95a64efc12f7bb2 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 dbda54e657471926130d2e057ba84ed0f9b251d2..138db94d2de5c5535b850bad46c653bcf0ddbe27 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 e6fc1049d1c3ee2771670d454242f09e29583833..e9f79b5ccdc8860f18097dbc177e88e96c5ea470 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 e1e696b52b56ed35f209fe1693dda3e6e9c97ae8..1ffac64dca09ff1f89953692baa9727d94a2ee7c 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 a0a474e9fc1f921c9864080179b44a79fa072025..ea7fc1ac6a2c3f58d3cdfb0a39d56b390d2ca67a 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 bdf8e35b27640cff8e042f877cc80a8f65298136..4994e0ab89e3948b3bf87ff08ff115831e15974f 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 6aa4d72982435931100ba69b4107667eff721d2e..20fae44f45b3839b575d9a8f09695112bc7e3963 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 4027414e7e55bf0501c1dd5c4fd8cadb75be12d4..35d53a3eaab7b3785c70f7ee0d6b804fe252f1ae 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 88be2ec0f878208f68875affd9e6a2a202b843b2..869f8db953113d7083bb921b3fb6f1f12b4fecd3 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 1d958ef976e45517c7f8e04817d008f3de0a8061..baa4f44c878c4df085d6754a294c24de6bea6952 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 052de5bf9e993e44fa2c50970ff1d98578c17688..5c15056a2b666948babd3c30eb10a493d692fd84 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 2d82a7712d92987f760d0a4e84b68a41ef7b55b4..9a7ae5890a8ace54068c1742c8a36f6fa4ad287d 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 9cf65f39c8916ef1b2eed69dccc5e8f6e666ac51..91986cb6f7df607650d7c3146bdd211608e079fd 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 33232e9868189ef7f13a16098db2d7afd021cbae..79e99061711018eb837e58bb84fac89805d8b691 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 2c994c9e204c84c71308a650bd069d32b38b00d3..f3d2be8a0f37064871a3142dfecbe42ccc96244b 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 96d108a657ba06d062aabf4db1a372ba86cd24f8..e1d5f1d4947626656f788df3db0fab959dc8a9bf 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 d1eb82112a8e70ed3cb03d1720fffc83185c5fd2..fd275ee9e87f02018754f4db8b48ffaae9f7885e 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 60d9c0952c7d3c83dc16bee8b745cae0f73d1720..c145bd0dfd4e863de14eb3d3d2861df3a756da9b 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 ed7e30dd5bf796ee0de8e5311b78b087c457f88f..c8147c08b7dc8932f07e84b13b71571c74cf69ce 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 7b00475e547c2ca99299bfffd941790e546e5ba8..2c82fb2f9d665ddc15e605ae3cf16864b95b5a94 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 034176c83ef1ef431a626feae024b71577561118..8967c9745cd397c2d4b743da08d79935ea85dc27 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 30605c80864bc9faa895e8c9029c903cee630db4..e8dc33fae841ad009fdb1dd75c3c3e518d3b43f9 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 f9c7e847a14806daf0bbfe3fc097c60616217908..93cbb67d05d2b0cc44f3b2a8258db71be5f95cb3 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 4747082cc68e7b6c539bfda5c9ec9eb0b08614a3..f5f79d4a4e424d5ae4d4f8cfdd922d87d2853618 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 37b755e9b36809dbdbfe2d1b367b10e0e1da1d03..bde45fe398dcb4cbfdc0a3564022049769023fa4 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 48a81a484a9b19a01a209d74bf4fbfd9f4657751..f8d31001940e39e2b0bc60dabe7969b6a1e2a2d6 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 0b054803d956f1eedcb85880991d805c28b7066d..5c3e9218ee6b618ed3bf4cdb4c4bdfd0e60508cb 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 5d9a34f136550366d977a756b03b35be24693f07..33b681a9fbed282cd92ab1d9ca9fe22a3d028d9d 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 0664feeb8f0322ccf3ec0062f8b5b16c9a25f97d..bd7155b9c5ae935f8ad803f2fc43f8def6ca20a9 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 1570535aac7706a981a1b44590297ab410ccfcf9..add1b94a8dd9e9423a16240fa6c0824c074b27b5 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 72416953aff283301099aa67b1d8161fc0ad7696..156dc603a44e5a7626a4d3065f0456cb131ea8f0 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 02c593c68351eda73b8a39c0d335d8928827bfbe..d633c23d80d2d0880c8e58ccb3741ebec5840e1f 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 e582980962924104b77a0eb57d4adb9046ae7209..df31c839fd18f41b6bddb1bce2a050c64649d5a2 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 5037d47dbcaad21b5325514003902abbbfa2f828..6b3401052d5201beec9a88c04de380720fbcbf14 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 6c0feb938fa4a033fdb90769b3d4e9f89e2e2015..f6bec20fd0185602e00e55df1b4d4f2423fa6311 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 f6a1aecce5d27eff2e816374aff3d49ab71699d9..d7e9814d683f50ef2e69bcd2185e1776ed806a06 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 cb38d17e8e278eb5d9fad5a685db1825c6ee89cd..1bdec3a0b06a6bf643f6d1b9488504ed07363b17 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 dbe75c4f57e1a0f521a32c64cc46b9fb22087365..b849edfe920be04075996d98377f6b25b97e1243 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 73fde92e5a44132ec02bd6964ccace5dd1b11ff1..549d1767b2ec322f813dd7cae8cca7f125178c75 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 e775d48dd59e8e0789789aedfff61fc9c5705cb8..f8efefbb973bad6520db7c9e510b4e42bf3065f0 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 29a3704293b665cfc73b8280aa63069601e30b72..8ebad69431e22099e09807067f3263369107d75d 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 ef8abffe0474c74f911866590fd4d3a51bad7627..6d49342a591ebbb89796aa35587b79ab3b0b0d80 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 f5ac3471f055c916a21583844de19806fa7961b7..c8413b3169a72d8bb1128d38f8ab4f46fcd40af8 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 3e08713d0c85dd32f4f7bf63a4288b5162bc603d..e930fe65be275ed448ca4fd669eee28067a28e9b 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 9a8840dededf42c83260210f87bf96207f2ff336..b13830f109f5419df1174e6783749cc8591ee669 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 ab6d8e5d59693aa1b55ea9c5bd958b5fc4cc8cd4..e7d00da9015419ebca0153a8066b5261be4a7848 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 eaea5555861ba74a5f920ab2431fee46231c4b84..a009db64ad1a8647acfe29d0c5c788e418cdef12 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 6326419ca78cceb1f4a56c00985db964b6adb312..fb6dcf1e8490560a9000cbc39516d757c6ac5987 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 e9496d1af1d409355533213f784707dfcffb7532..b4463c4a03d271e8dd54bd6c99bc64e256804c1d 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 ec76bad83d9ad59f5308f1dd97bf53ab6cce5750..17e65da6162c2278821cdcb66dd4805cb84bb9fe 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 2e9470f5a786e409ecd1186724ea4ad148ddd8b5..34c096e609a3f5f3f4404229018dd7c68a7e6c50 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 1fdea95dbad79d0b88633aeb32d321d84c50e694..12491d3f93a641b1d018d0a3b470dbffe1c8399c 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 1fa5ea3419bd19a6ae6f804bd6242257e326acc2..97b8c704c527e5c8f9e5ff2d36bdc2d2f3742b9e 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 18fca0c688fd01a3a73436b0baac560a1c2074fb..79c8568173b52c3ecfd31a85607b26f91526d3e4 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 2c501c4493da3e3987c99fcc940e00a800d641dc..c58ffc49d7249ecf09d7da79704a8facff21fe99 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 340fb6416a3168d487d1a8d6c08fea77bc84d49e..08319fd4b435768f909ac9f3c981ae107af38c49 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 8e007f69370e59ca890da0c34aff391916c769fb..a62068f381186baa75863c24707c289297097ec5 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 29d13183c786b21eb65b19da125c2f941ff2c86c..01a7d137c317385c505f3904188c9e3854d97ed7 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 09827d81ae8280c4867841381814fc2e812d88da..08f0ea1fb85bd0d8be064e1118c7de5eaebd2863 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 385711a1107beaf683fd13f10c247b6677b707b0..15491d8ed159179b97e01b8f0243e0fbe64528fa 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 a000798689b55c391236250813785229ed9d7cbf..abbe7aa75f3737ad4e493c84eba6ba50d67cf3a2 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 6cc0aac1ff616b6275a47a620aee33be19328dac..5bb025cfdd534a69ceb68167cfdae87106feac2c 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 6d03816f7a40780356fcfc7d477d9c5b3aa8679f..655b21de4515eb607d32be9ea0c9d5b621d2710a 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 104ff21a7085e9b633a005dbad7c6e696e482cca..de7937962833da7464ed6f0110865b6ba07ef7f3 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 27d9f92112ac6ba0e83536a4fe4601be9a32f0dd..4671adeec5c740edd18115995d9b65fdc954f98c 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 a87318cf06497c928f48778caab9e5f30b4bc296..ea65c2a3c1cad34ff16207ab584f51fcf500345f 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 ff3dcd3a944a82d02fb06f17317f1c60d93594a2..53acd16d508ee707d6360c07794cf4e19deee027 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 7ad96f26eee79a944f224057e5c72d9382920f66..eb8a2a142f1323afde5490fb75b9dcd2b21e8aad 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 4fb50c6f6d128ef6d1a3ea67474cef059dcaf8bd..4aed5971986af3881688c218215a9879b9206445 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 2bc13b3abdb16166356181efd1baf41075aa79d4..6e4d2d0b1982ff45a2495141391782cc639d560a 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 819ff656a89932cef62120ea8fde0a65cabdd1f1..3bbaf68987f71806b45d3b693413cad0d3c8c9ad 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 44fa71d93c8f387adc362ec1d1a72da7af86b3f8..69e4bdf44eac491523d75368d0f2c3dbc7aa26ce 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 accf22f7e4403ac588e1a4c47c0b4cbe7243547c..7766afd752aee82e47560bb8ec208b5777d63589 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 497135a25ca1bd20c058a4873efea648174eb09c..56dc03ec0c5ae57c07a0eaa81b74725b09a225ef 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 90472318392d7685dfd980fe3ab91c16eedea609..63cdec1b5d78c93fad6f27f276797dead6a35b7a 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 f675c2c9a5632f0884b86968199f558384202096..5bdce30bffd5634d37540fe1266dfe4996e302d6 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 ef582663bd5ae7184f378631892c523b2ec89654..d4187326ffab1e4c8d5e6341fe119045187ae246 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 efb4113426f25e93d7ebe750cc351c30ef5ccf99..4147e02102cb76794a8974b1c9cd8a386adc796b 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 574d2c859c9db1ffcf4c4523089ddc01bfe82d5e..349027e041ff32e679cebb5d1eb613181f5e4789 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 cb1b0117ed8fec99f3909f5b2f10cda3f596ed57..1ca1763934667b13722c21d0dc610e9fff77642a 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 10cfa05e7799f7094ce041b6256ac57a6e62b5b6..8bd8bf84f33a593bdc77fbbdf2e31bb90015e39e 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 f40221d47ad85c2fe62384ca62e7ad530a0f052a..53c977cc6aee0a0a1e661163a2397d385bd1f1db 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 331d2f570710690a2bb188f5b614d78f25963c09..fc74e91cda228e9b9015a1f41119aa6f24f6c520 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 49190bc2ba90ded7cf35f2e4342a6ad7ae81b107..77f4f6445239874edb79819be7730bf2bbd62e68 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 15961aa2933888704a13820919b60bc9fd5aacbb..36e550b16c5c27df2d08dc35de20d6bc286efdc8 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 22bfab29c76522353c0bcd87e70de051630226e3..b0766a9acc4accd110bb578b2709e5bb46e4d1aa 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 56602be8df0d451c747e7318f841bc66ad0fb391..aac0527f2e58e932989279d9c469928316fc3399 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 a37a597e57470653b50313ee2d1525ebe3c92ded..9ded98fdb5e663c7fece4e3d40b8960e7b3f5aa5 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 45fda5caa93ed0bbe36427b2b1bc1508c8af1765..2e0a2c2d0edc753a0f5ed0478013732617a279d2 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 b38f9398ea422e3b9a88adf475feb188f4b3a20a..0b404ce3d12b6b68561c58d1eef4ab2dd3821d35 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 152c5b2bed25e7f173fddd74d1abe250d7bb6f0a..9a729e178b976ab0c23716802721872abd4f14d0 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 a3544192839a416a4564a95a5e498185df737241..d84b3b74f31e0de2f5b93faa9d8d4464871197a9 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 e382dc5e0ce73ddfbf105cf40d982cf8cd4246f2..79d6710f82b1e91800e5bb2791c61e9b45e307c6 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 e7103f03bfc3da721ffc11d69032d98b37717b22..5ece5405de6b2187d2a531f86afb345bcffa923a 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 c51889d927874cce5e006870bec7f962fb25edef..eec00ac4e87153138b1fa44ee06644a573e4e897 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 0b871226b0e15c7d82b1a32ba146fb7e793b1e80..b32685cf6d1af5fb5b23364ff67be64016e46c3e 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 e0ba5ff9e35dfa2916d25cf609d07a077ecb1212..4e130d331f459fe3af3bc4bad776e85f766b3659 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 ce4354f2a6fd2ec1ee9d770708637cf42addba25..053f496cd97866d4a44204a520c13610072d1b9d 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 33816b823b8de69eb6ce4cfd805c8da56469e125..ab61e6524961378a8c116999259bb0f76da6eed2 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 d58a6627d7511138ff08060d29aa74e7a22ebdeb..d238084f8e3b5fb8fdf218ddb10fda4ee28855a3 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 76f99902dbf448939ee0db2bcc75c73ad4a2b630..7816d1035c27dd3d035519ce07e9df40cbb589a0 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 99fd9d34365a9313b2faa3f3ee15641bf1c116c1..03cd50f6ca2ca0d7b29cf624aede921447290e5d 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 da88cce37c9e6f57e06400b2e9f80ff691838fc9..fa75ce319682528f8e86263093da9c6cf236fca3 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 30314f432061f30bc68e99be2160a723b18ccc7e..4d1e83f136c9c0edc70138cc39a1575ce4e33344 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 b39c4c457dc264cbe28c39b44f69346221412b8c..fa885805a77694f113cfbc7a282192270e3d555d 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 58928b166f2be6a3ed0bd99d1de2e3254c9c15cc..1a70665a5aa1707de5bc23ecb21bae6e1810eacc 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 ee1fed758ed3a6fa095adfd811364e581bc92ff1..8c63a94087f15168a4d92aa236caa8f505204340 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 b0582c14e78d91b73e17133021848b1322b605d3..7504626708b4637de52eaf3b005d2ed581421fa7 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 dffb329c1456ad1dfaccc1c16633bf8e0e6c2717..4f8200b790187b9fc110d314a4db61b927fd4660 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 7c8a2f3c4901c2935769f8dde97a05b940f59afb..4adec6ad1353cc6fa1d11c2387f511c328338e12 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 4d02bb1d09d164d713bcc45f4b9a5fcc4ad9931f..fd539c0bc84d798ef0cd2a525837b2f0045f9514 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 a308e0e9f89f29f561a0f5c4d829708dd7b4c551..1f1654e2cafa1affb090eb1ba24dc43ddf4baf34 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 7274bf7f02e75c14022c5939c398ce87463c3f8f..7a8a4cdc7d3530226ffd7e37e621bf9e5789e415 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 c50aec953d6f9010e463ba3e556ca3f719220dab..a699550179c267f3513ebe53199c5d3b7642eff6 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 7a36c40f7fe9ddf1078971a3ccd27a0de8e2bccd..6a906180eabc27c36a604063323b83e0391c8617 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 f09488893254aa27b17ef8d7526bc256233efc34..92e485a018ed967a7b86de3de822a44d31142c3e 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 e6dfd9de1afe8d25c4f0cacf8921788caaf68bde..6527735a247562b6954fd1ff43510c4e20c9a718 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 2a8ee4f1b280d568bb87f5d1bb5444093e0c7be7..981624ac664c38245b740c590bca017688661e1a 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 a20160ad01939c02ee43d502e3feff63be8161f0..6cca2e5f06f3d840c6b95d79a3934b09d2e9246b 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 3cfef77384b16ab5a69843545df69f83bff9530c..edb5b70f4686ff9074de0911eaa910884ec4ff7f 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 813f0edffee216f8f7bb2d29808c24f2a1d14663..850063e01fd8e7501cd30eef987167dd1cff6eb2 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 2e4f4195e136bc5efa15d37c6adc4e2890a19d3b..44ec145d275c53a77441aca969b366e002491728 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 a1c6ca850d9298fdbb2eba18d3951b12776d74b9..a52c4c04a0057fe97a60e0b5d56abf1a0a5fbfdf 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 b6ac14e17c45273693dcb20ed8204713fa9381d4..4e23d9a98e11cf3a525b340754046a937ed5eb1c 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 d718c322912e32c7182987091731654aaf5a3a18..15e5c97e356949a20b0951abbd397bb11c3f56ce 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 bbd42365207d185dfefd0ac52b00a48c513c2ff2..c09779ea1c7f05a9b05b81b38143de12cddbe327 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 4f55fc87f1e1d4e09d511d980aa6f0c85f8c427f..bd30798c114963fdbd6e24b7c665e17d7738978f 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 584cdba6b4e230d0837c6b378ea0d2368f781a6f..9997d4e64314e4f9b677e9bc026fc42bc9b1bfe5 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 71f071de0c728aab03bbaed24ab03dad7e26c656..31a37e911ab2fd6a789a7f6ccdd6fbcbbf20f4fd 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 192a00c7cd42189aa59385b84aae18e5c4a15168..523d06a52c0e8e59db1651c01105fe88f3c0cb5a 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 8e99e93105e4b5d478cf45da91451634a8b8fe74..df188724d7e635ff11ea09b87131474c925c4beb 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 29fdc1743985c35d09e49a679c77db1c32b9c22d..94a34618966e38e3c99674a880b5590e8e678b2d 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 5d1af5d86c2f3b37ebc5a2b13be0a81efe308fa0..4ab8c82f474cbb93b7567b40bef8d2c1b5e2ba60 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 2fff4d7f6f6a878e76c1ba40ced778b4fa58c895..2f81e91a82faca6b1ee8a7a1c755181a5f9bc749 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 44d1bbe61fd491f5ebbedfdf9c0916053433f5b7..25cc0ed2e46a8337763f8fd57f54981f21ede3b9 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 3f031c0be0784a674ba4a1735222ce3e2b37a678..9a5fca46f4878f1fd799cd6fea01703ac5e75e9f 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 b825aa6e6858ff87af7fdb8df8faf88c52550bbf..ce13dafe110137f6efb180ab18ee7b6e33b062bb 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 2fb780f5daacba2fe320f7f5fa9c63eea3bf462a..38ac363e293aa74e26e91ba3a9cafb996548f03f 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 7d4998299171511fa7bcb8fdcd2b1dca3f235dc1..f504089d2350da87a0aa661e8574fd3c5b2a30e0 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 d68a2df3b31fa8b27d7a147a884bb7ee0b50e1c8..4ae2b5cd4b4228719149f37b37debde42f479c15 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 7b91c99b3c486bae3fe3463148c89760d291718a..5a0fd0b96d89b8ac1a7219e56b5ae6183e496c9f 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 d48b2bb0e144da37c30c84355696982fd2f5017e..def8fa702066f2bbae44308d1ab8e6d9c965e8bc 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 ac34489355c43897449a770df5c39bf23779a693..5b8d05393ca6020a39c56574fca939edd2bce965 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 e8c55c0b84016e62b614b328b971c79cc7e14e93..dff5c185dc45d808d9ac51cd002ec035f0bd6662 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 6dc9a37b3575049e4b00271c94d9a2bfc04c7fca..6cf3ab8be1a29b30de212df3b0c4b07066c165f7 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 9c829b402c43d163b9fea1fe70e421044e0cfdc2..7197efee78d49b7f1b0a7ff08971d85fac44573d 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 d60516a0b8b84750e52319d1c9be48beaf281b17..16c41331d3cdbaefe66ae1e02812ad282e834e33 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 81b6441fd84371ffcda0ba2074bbbc80b91d745d..47ca399d607f4a982f180442a2409256b684977a 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 2e262130caf59f150aa668e4d428a68492289747..11a8855454c09d30f708dc4bbddd8a811341f4bf 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 20a8b6ef5c203f6531b71d3cd867d8f2502d7f99..941a19a617f0f28a0ecbb4be3b6e43e5c194ded3 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 f859358fc0b4c66503c6309ee20164dc4eb9b755..4a2078767149e9a9adeb619a35594772de0c1cd1 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 0a6b3d27909273644495909df3bd2e2c23b1d8da..0e89e09494355c04da6da6e3c09646e090c0acb8 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 135025b500f12a8ca02e9a7150b7aacc60b76c9b..273785b42f902a69c980494dca81897ef4ba4527 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 a70c15490a723d42316d313337212196aaa8f040..6298840a3f483a7a1eafc4c2c731930550634b7e 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 b8b8601a5bf12b67fad526cc7ab9ef0d5e34e121..fd34f8f1e02278e80f1376736df3cd0205f60f4d 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 323014ab3232d338fe481a678d317905802f8450..f21b370db8ab25c7a41952ab0064b5bce44be257 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 5f10b0774d6f9baad6a43993d0616645e2935673..31cb759c1302021bf206e32b9773c0f0eebdf4ff 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 1992ac040d181d09961a40e3d28a0caf2938cb66..72e0346b6e53e29dc218505898aa8eb86cecfe39 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 e2ed888d4d47f23e696efbf161947f84307305cf..ad92f0d49fb970f6dc045c82991199630acf0bfc 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 040193aaf984938356f042b5b5b919c5e55294c5..de71b8330f4404455c473f82ad6cd8108c2b7af2 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 dc6ffbbf5ef2cd2a4ed72b9bbf8dd7a8b8ea3b21..ffd99f7289a62709dd3a2db5ba3dbacc5230730f 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 ee2642b2e610efc1ec0fa085ff32e6acd57130cd..678d3e1e72e81129d2755adb909e5ce7f6ae9f47 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 60872fcbdb7a3aad6a05f6230e353e642d56deaf..a8a583f87222e32bcd50b8840912067cff223390 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 3c44fcd454422a0b9eb1923e93dd984e8d1156d1..83bac8cefe85629553e097e4415c66873920f7e4 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 84decfe9c8ca1c45fa3013780c580e98769a8acc..71405623adb68f21807de18775e632e05df476f6 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 37531c853ade57acf67fb38923c51043a03c6f13..524bed78210fe772cd5ea4c7004910b2706e6602 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 68ced139c79a2def04e4209697181f39ec069b42..e61ee306c25455825a14fec581e9a5e9c425527e 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 c29ebf07b3be07ab72ce70c1a322a8e1ba42c798..fce759d7f657c034bb6e0a6f65fa09ad0b462232 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 c639c003bc59537e7d09fb3e86bb06b27f2c7aec..bf71445db51f9e74c88335a97c5beb21114b6314 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 add35b0b3717954104220f45ad37683e8d942a2b..7c39b47bf4cad912e2083545a990f45fff57f57d 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 d62734e2f48a56352cbe9f6f0c7b89538eb79410..87d1a03d940dfc58710293b2abac0493e051d0f0 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 25c53c73d3a157218321509cd0f3ab444d7c82f6..e530e591f55968b6555798c1b0deb9533e47dc8b 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 d8b8b3ccb80eeb60205f8c8e5c8c659e04110283..03dbbaf0d3aa0e9fcd98fdfe16c03ec06451ae26 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 43b85fcb5a6f574fe7cc5e85a4fd5f321121d232..aea65d2c7f9a20ca58e9b2ca3c7df4bf7c939236 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 4e827e988c6b22a1921c7873cf36d694a4ec8167..beb64c47d93a6c344d75103001dda64e32c74465 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 aeb405ca6a556b480cc59359cf91aee4b81072c2..6890e8981641dac0c72a6f21be3a8919b3f29169 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 cd1ecbaff6177b0e3cfbd796c2729503de0211a0..449e319f2d43eb853249a790e033fc4502ed0102 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 85e8879bbc166ab4e220a1f5f2a4a80f3982f98b..c9fbb45430a66e2a1e1583ffa70fa03cf298c2d3 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 c05598c924510e49ac9f90f65827f82f1da0804e..87f9a5e16a4d7356a0c0d325422559fb97152dd0 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 72dd58676a509a2a4e4c8f44790beb9434f99be5..df619055df74ab9f1947909cdeb237a23ddeb2ad 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 290e92ce597aac9da43195d866bbfdf6deccb324..6d5d32b2f5a16dcbe936f428e5c39ce307bed00d 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 e0c23cbb4a8e538898e99e078c9e3076f20b0ce9..6535b7fca54c2776363aac622c8ba4fdabf542f0 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 12b2f11f6f828d8494183eba26c3e4c3209846f5..97e635fe483a9bcc7fa958ed3053daf5dd06b0e5 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 2047fe26118b5a1851bdd5d047cec569d1981ae3..7f17c115fddd62b9c62d10a5d4d1093d1a3392a2 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 5162b530cfc528d4d3e09501fbbca1f30e42b953..8cfe57fa12b05fa8d2802eb331f1aea1e2ec4169 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 2925c6f0711629d9f82dfb957a97fe60cd2dca0d..6f0d710f9782c6d3127032a8f4084f2c9d7ddb91 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 aafdf6e6907845f477248161e45810c5c77a2218..41467959aed3b7d4794922df38e116637398615f 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 c67da56093f34da18f4b7803eed84f5346227bbb..309adff4046f2b204cef4c4331095431c9a45f3e 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 5c665a1bbfc6a228dc6df1291529c1a6af16040b..15dbde8663cc12f4e681b8aac4e7aa571baf7a44 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 696b7d84e885226ea3c6e7dfad12ef6abc1dd9f1..f65274fb5099652b324c98d908725c7e4bfba54f 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 635fd8033e0767b8ba50316a3978a975c608a4be..020fdebc66d3a64e31a450ad4a9806db4145ffca 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 04620d612784713b7c3e575c198a1c0121cf84e4..284f2fce858a652b975f7ef678dab005d2be1c9f 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 c56e5fb3ebe466024ee4ac34fd102c8e68eb1f2b..5c33062ac809c3e41bcf3bed7d432c50c434e8e9 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 faa0bc0b080ca5042c0a9e5939570d8746ed6cc1..d3dd69162f00e99439f62d278c871c35438934a0 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 ef09b7e251adb10c0dc9b346ded8bc83cb305633..d98daafd2e490552c57e6086a9204015e0057749 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 1d470c61a068d82e5f6cc3a1e48b484795230045..061363b1d1583afea9fe808f9fb2dc9cf9a79f7c 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