From c07aae65345e7da6929eb03e5085ea9093c020cf Mon Sep 17 00:00:00 2001 From: Zeger-Jan van de Weg Date: Mon, 14 Jan 2019 11:29:56 +0100 Subject: Replace net/context with context package Leveraging `go fix` these changes were made, I only applied some regexp to get the import grouping correct. The old package can't be removed from vendor directory yet, as other dependencies depend on it. --- internal/featureflag/grpc_header.go | 2 +- internal/featureflag/grpc_header_test.go | 2 +- internal/helper/housekeeping/housekeeping.go | 2 +- internal/helper/housekeeping/housekeeping_test.go | 2 +- internal/helper/storage.go | 2 +- internal/middleware/cancelhandler/cancelhandler.go | 3 ++- internal/middleware/limithandler/concurrency_limiter.go | 2 +- internal/middleware/limithandler/concurrency_limiter_test.go | 2 +- internal/middleware/limithandler/limithandler.go | 3 ++- internal/middleware/limithandler/limithandler_test.go | 2 +- internal/middleware/limithandler/metrics.go | 2 +- internal/middleware/limithandler/testhelper_test.go | 2 +- internal/middleware/limithandler/testpb/test.pb.go | 3 ++- internal/middleware/metadatahandler/metadatahandler.go | 3 ++- internal/middleware/panichandler/panic_handler.go | 3 ++- internal/middleware/sentryhandler/sentryhandler.go | 2 +- internal/middleware/sentryhandler/sentryhandler_test.go | 2 +- internal/rubyserver/health.go | 2 +- internal/rubyserver/rubyserver.go | 2 +- internal/server/auth/auth.go | 2 +- internal/server/auth_test.go | 2 +- internal/server/server.go | 2 +- internal/service/commit/between_test.go | 2 +- internal/service/commit/commits_by_message_test.go | 2 +- internal/service/commit/count_commits.go | 2 +- internal/service/commit/count_commits_test.go | 2 +- internal/service/commit/extractsignature_test.go | 2 +- internal/service/commit/find_all_commits_test.go | 2 +- internal/service/commit/find_commit.go | 3 ++- internal/service/commit/find_commit_test.go | 2 +- internal/service/commit/isancestor.go | 3 ++- internal/service/commit/isancestor_test.go | 2 +- internal/service/commit/languages.go | 2 +- internal/service/commit/last_commit_for_path.go | 2 +- internal/service/commit/last_commit_for_path_test.go | 2 +- internal/service/commit/list_commits_by_oid_test.go | 2 +- internal/service/commit/list_files_test.go | 2 +- internal/service/commit/list_last_commits_for_tree_test.go | 2 +- internal/service/commit/raw_blame_test.go | 2 +- internal/service/commit/stats.go | 3 ++- internal/service/commit/tree_entries_test.go | 2 +- internal/service/commit/tree_entry_test.go | 2 +- internal/service/diff/commit_test.go | 2 +- internal/service/diff/numstat_test.go | 2 +- internal/service/diff/raw.go | 2 +- internal/service/namespace/namespace.go | 2 +- internal/service/namespace/namespace_test.go | 2 +- internal/service/operations/branches.go | 3 ++- internal/service/operations/branches_test.go | 2 +- internal/service/operations/cherry_pick.go | 3 ++- internal/service/operations/merge.go | 2 +- internal/service/operations/rebase.go | 2 +- internal/service/operations/revert.go | 3 ++- internal/service/operations/squash.go | 2 +- internal/service/operations/submodules.go | 2 +- internal/service/operations/tags.go | 3 ++- internal/service/operations/update_branches_test.go | 2 +- internal/service/ref/branches.go | 2 +- internal/service/ref/delete_refs.go | 2 +- internal/service/ref/refexists.go | 2 +- internal/service/ref/refname.go | 2 +- internal/service/ref/refname_test.go | 2 +- internal/service/ref/refs.go | 2 +- internal/service/ref/refs_test.go | 2 +- internal/service/ref/remote_branches_test.go | 2 +- internal/service/remote/fetch_internal_remote.go | 2 +- internal/service/remote/find_remote_root_ref.go | 2 +- internal/service/remote/remotes.go | 2 +- internal/service/remote/remotes_test.go | 2 +- internal/service/remote/update_remote_mirror_test.go | 2 +- internal/service/repository/apply_gitattributes.go | 2 +- internal/service/repository/calculate_checksum.go | 2 +- internal/service/repository/cleanup.go | 2 +- internal/service/repository/config.go | 3 ++- internal/service/repository/create.go | 3 ++- internal/service/repository/create_from_snapshot.go | 2 +- internal/service/repository/create_from_url.go | 2 +- internal/service/repository/fetch.go | 3 ++- internal/service/repository/fetch_remote.go | 3 ++- internal/service/repository/fork.go | 2 +- internal/service/repository/fsck.go | 2 +- internal/service/repository/gc.go | 2 +- internal/service/repository/license.go | 3 ++- internal/service/repository/merge_base.go | 2 +- internal/service/repository/rebase_in_progress.go | 2 +- internal/service/repository/repack.go | 3 ++- internal/service/repository/repository.go | 2 +- internal/service/repository/repository_test.go | 2 +- internal/service/repository/size.go | 2 +- internal/service/repository/size_test.go | 2 +- internal/service/repository/squash_in_progress.go | 2 +- internal/service/repository/util.go | 2 +- internal/service/repository/write_config.go | 3 ++- internal/service/repository/write_ref.go | 2 +- internal/service/server/info.go | 2 +- internal/service/smarthttp/inforefs_test.go | 2 +- internal/service/smarthttp/receive_pack_test.go | 2 +- internal/service/smarthttp/upload_pack_test.go | 2 +- internal/service/ssh/receive_pack_test.go | 2 +- internal/service/ssh/upload_archive_test.go | 2 +- internal/service/ssh/upload_pack_test.go | 2 +- internal/service/storage/deleteall.go | 2 +- internal/service/wiki/delete_page.go | 2 +- 103 files changed, 122 insertions(+), 103 deletions(-) (limited to 'internal') diff --git a/internal/featureflag/grpc_header.go b/internal/featureflag/grpc_header.go index 28d3c978c..e71f1cfe9 100644 --- a/internal/featureflag/grpc_header.go +++ b/internal/featureflag/grpc_header.go @@ -1,9 +1,9 @@ package featureflag import ( + "context" "fmt" - "golang.org/x/net/context" "google.golang.org/grpc/metadata" ) diff --git a/internal/featureflag/grpc_header_test.go b/internal/featureflag/grpc_header_test.go index 76e0925c5..8d18c6037 100644 --- a/internal/featureflag/grpc_header_test.go +++ b/internal/featureflag/grpc_header_test.go @@ -1,10 +1,10 @@ package featureflag import ( + "context" "testing" "github.com/stretchr/testify/assert" - "golang.org/x/net/context" "google.golang.org/grpc/metadata" ) diff --git a/internal/helper/housekeeping/housekeeping.go b/internal/helper/housekeeping/housekeeping.go index 3b30c8484..5d05b0c06 100644 --- a/internal/helper/housekeeping/housekeeping.go +++ b/internal/helper/housekeeping/housekeeping.go @@ -1,6 +1,7 @@ package housekeeping import ( + "context" "os" "path/filepath" "strings" @@ -8,7 +9,6 @@ import ( grpc_logrus "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" log "github.com/sirupsen/logrus" - "golang.org/x/net/context" ) const deleteTempFilesOlderThanDuration = 7 * 24 * time.Hour diff --git a/internal/helper/housekeeping/housekeeping_test.go b/internal/helper/housekeeping/housekeeping_test.go index 8f6defa73..21c486db5 100644 --- a/internal/helper/housekeeping/housekeeping_test.go +++ b/internal/helper/housekeeping/housekeeping_test.go @@ -1,6 +1,7 @@ package housekeeping import ( + "context" "io/ioutil" "os" "path/filepath" @@ -8,7 +9,6 @@ import ( "time" "github.com/stretchr/testify/assert" - "golang.org/x/net/context" ) type entryFinalState int diff --git a/internal/helper/storage.go b/internal/helper/storage.go index 5405421ce..83341b0c4 100644 --- a/internal/helper/storage.go +++ b/internal/helper/storage.go @@ -1,12 +1,12 @@ package helper import ( + "context" "encoding/base64" "encoding/json" "fmt" "gitlab.com/gitlab-org/gitaly/internal/storage" - "golang.org/x/net/context" "google.golang.org/grpc/metadata" ) diff --git a/internal/middleware/cancelhandler/cancelhandler.go b/internal/middleware/cancelhandler/cancelhandler.go index 4592059d5..8ee870522 100644 --- a/internal/middleware/cancelhandler/cancelhandler.go +++ b/internal/middleware/cancelhandler/cancelhandler.go @@ -1,7 +1,8 @@ package cancelhandler import ( - "golang.org/x/net/context" + "context" + "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/middleware/limithandler/concurrency_limiter.go b/internal/middleware/limithandler/concurrency_limiter.go index 56c67ae89..66343f715 100644 --- a/internal/middleware/limithandler/concurrency_limiter.go +++ b/internal/middleware/limithandler/concurrency_limiter.go @@ -1,10 +1,10 @@ package limithandler import ( + "context" "sync" "time" - "golang.org/x/net/context" "golang.org/x/sync/semaphore" ) diff --git a/internal/middleware/limithandler/concurrency_limiter_test.go b/internal/middleware/limithandler/concurrency_limiter_test.go index e89dbcb97..8fe1c829e 100644 --- a/internal/middleware/limithandler/concurrency_limiter_test.go +++ b/internal/middleware/limithandler/concurrency_limiter_test.go @@ -1,13 +1,13 @@ package limithandler import ( + "context" "strconv" "sync" "testing" "time" "github.com/stretchr/testify/assert" - "golang.org/x/net/context" ) type counter struct { diff --git a/internal/middleware/limithandler/limithandler.go b/internal/middleware/limithandler/limithandler.go index a70e4a309..7d8d6ab8f 100644 --- a/internal/middleware/limithandler/limithandler.go +++ b/internal/middleware/limithandler/limithandler.go @@ -1,7 +1,8 @@ package limithandler import ( - "golang.org/x/net/context" + "context" + "google.golang.org/grpc" ) diff --git a/internal/middleware/limithandler/limithandler_test.go b/internal/middleware/limithandler/limithandler_test.go index 4a6e6ffc8..c98f7f389 100644 --- a/internal/middleware/limithandler/limithandler_test.go +++ b/internal/middleware/limithandler/limithandler_test.go @@ -1,6 +1,7 @@ package limithandler_test import ( + "context" "net" "sync" "testing" @@ -10,7 +11,6 @@ import ( "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" ) diff --git a/internal/middleware/limithandler/metrics.go b/internal/middleware/limithandler/metrics.go index 3e0accd7a..6628044a0 100644 --- a/internal/middleware/limithandler/metrics.go +++ b/internal/middleware/limithandler/metrics.go @@ -1,12 +1,12 @@ package limithandler import ( + "context" "strings" "time" grpc_logrus "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" "github.com/prometheus/client_golang/prometheus" - "golang.org/x/net/context" ) const acquireDurationLogThreshold = 10 * time.Millisecond diff --git a/internal/middleware/limithandler/testhelper_test.go b/internal/middleware/limithandler/testhelper_test.go index 40eff4f01..424804928 100644 --- a/internal/middleware/limithandler/testhelper_test.go +++ b/internal/middleware/limithandler/testhelper_test.go @@ -1,10 +1,10 @@ package limithandler_test import ( + "context" "sync/atomic" pb "gitlab.com/gitlab-org/gitaly/internal/middleware/limithandler/testpb" - "golang.org/x/net/context" ) type server struct { diff --git a/internal/middleware/limithandler/testpb/test.pb.go b/internal/middleware/limithandler/testpb/test.pb.go index f94d68549..03a700107 100644 --- a/internal/middleware/limithandler/testpb/test.pb.go +++ b/internal/middleware/limithandler/testpb/test.pb.go @@ -24,7 +24,8 @@ import fmt "fmt" import math "math" import ( - context "golang.org/x/net/context" + context "context" + grpc "google.golang.org/grpc" ) diff --git a/internal/middleware/metadatahandler/metadatahandler.go b/internal/middleware/metadatahandler/metadatahandler.go index 5091e6654..ca3690662 100644 --- a/internal/middleware/metadatahandler/metadatahandler.go +++ b/internal/middleware/metadatahandler/metadatahandler.go @@ -1,12 +1,13 @@ package metadatahandler import ( + "context" + grpc_ctxtags "github.com/grpc-ecosystem/go-grpc-middleware/tags" "github.com/prometheus/client_golang/prometheus" gitalyauth "gitlab.com/gitlab-org/gitaly/auth" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/labkit/correlation" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/metadata" ) diff --git a/internal/middleware/panichandler/panic_handler.go b/internal/middleware/panichandler/panic_handler.go index 58f9c0abf..58e644e12 100644 --- a/internal/middleware/panichandler/panic_handler.go +++ b/internal/middleware/panichandler/panic_handler.go @@ -1,8 +1,9 @@ package panichandler import ( + "context" + log "github.com/sirupsen/logrus" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/middleware/sentryhandler/sentryhandler.go b/internal/middleware/sentryhandler/sentryhandler.go index 44d398a12..47991a82a 100644 --- a/internal/middleware/sentryhandler/sentryhandler.go +++ b/internal/middleware/sentryhandler/sentryhandler.go @@ -1,6 +1,7 @@ package sentryhandler import ( + "context" "fmt" "strings" "time" @@ -8,7 +9,6 @@ import ( raven "github.com/getsentry/raven-go" grpc_ctxtags "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" ) diff --git a/internal/middleware/sentryhandler/sentryhandler_test.go b/internal/middleware/sentryhandler/sentryhandler_test.go index 2803d45dc..88888acb9 100644 --- a/internal/middleware/sentryhandler/sentryhandler_test.go +++ b/internal/middleware/sentryhandler/sentryhandler_test.go @@ -1,12 +1,12 @@ package sentryhandler import ( + "context" "fmt" "testing" "time" "github.com/stretchr/testify/assert" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/rubyserver/health.go b/internal/rubyserver/health.go index 10550d7dc..cc6005f89 100644 --- a/internal/rubyserver/health.go +++ b/internal/rubyserver/health.go @@ -1,9 +1,9 @@ package rubyserver import ( + "context" "time" - "golang.org/x/net/context" "google.golang.org/grpc" healthpb "google.golang.org/grpc/health/grpc_health_v1" ) diff --git a/internal/rubyserver/rubyserver.go b/internal/rubyserver/rubyserver.go index 672853ef7..8eab03025 100644 --- a/internal/rubyserver/rubyserver.go +++ b/internal/rubyserver/rubyserver.go @@ -1,6 +1,7 @@ package rubyserver import ( + "context" "fmt" "io/ioutil" "os" @@ -24,7 +25,6 @@ import ( "gitlab.com/gitlab-org/gitaly/streamio" grpccorrelation "gitlab.com/gitlab-org/labkit/correlation/grpc" grpctracing "gitlab.com/gitlab-org/labkit/tracing/grpc" - "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/internal/server/auth/auth.go b/internal/server/auth/auth.go index b97bca8fc..c83ddd615 100644 --- a/internal/server/auth/auth.go +++ b/internal/server/auth/auth.go @@ -1,13 +1,13 @@ package auth import ( + "context" "time" grpc_auth "github.com/grpc-ecosystem/go-grpc-middleware/auth" "github.com/prometheus/client_golang/prometheus" gitalyauth "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" diff --git a/internal/server/auth_test.go b/internal/server/auth_test.go index 9448df134..fdbf3d6b0 100644 --- a/internal/server/auth_test.go +++ b/internal/server/auth_test.go @@ -1,6 +1,7 @@ package server import ( + netctx "context" "crypto/x509" "io/ioutil" "net" @@ -11,7 +12,6 @@ import ( gitalyauth "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" "google.golang.org/grpc/credentials" diff --git a/internal/server/server.go b/internal/server/server.go index 5f229a877..32bae8d2a 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -1,6 +1,7 @@ package server import ( + "context" "crypto/tls" grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" @@ -22,7 +23,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/service" grpccorrelation "gitlab.com/gitlab-org/labkit/correlation/grpc" grpctracing "gitlab.com/gitlab-org/labkit/tracing/grpc" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/credentials" "google.golang.org/grpc/reflection" diff --git a/internal/service/commit/between_test.go b/internal/service/commit/between_test.go index 8f6fdd1cc..00187a32f 100644 --- a/internal/service/commit/between_test.go +++ b/internal/service/commit/between_test.go @@ -1,6 +1,7 @@ package commit import ( + "context" "io" "testing" @@ -8,7 +9,6 @@ import ( "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/commit/commits_by_message_test.go b/internal/service/commit/commits_by_message_test.go index ca183c3ef..1801eb1cf 100644 --- a/internal/service/commit/commits_by_message_test.go +++ b/internal/service/commit/commits_by_message_test.go @@ -1,6 +1,7 @@ package commit import ( + "context" "io" "testing" @@ -8,7 +9,6 @@ import ( "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/commit/count_commits.go b/internal/service/commit/count_commits.go index 1167c23c0..55d82d83e 100644 --- a/internal/service/commit/count_commits.go +++ b/internal/service/commit/count_commits.go @@ -2,6 +2,7 @@ package commit import ( "bytes" + "context" "fmt" "io/ioutil" "strconv" @@ -10,7 +11,6 @@ import ( grpc_logrus "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" ) diff --git a/internal/service/commit/count_commits_test.go b/internal/service/commit/count_commits_test.go index ec0acae17..8c41f0755 100644 --- a/internal/service/commit/count_commits_test.go +++ b/internal/service/commit/count_commits_test.go @@ -1,6 +1,7 @@ package commit import ( + "context" "fmt" "testing" "time" @@ -9,7 +10,6 @@ import ( "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/commit/extractsignature_test.go b/internal/service/commit/extractsignature_test.go index 786fde75f..049178a7c 100644 --- a/internal/service/commit/extractsignature_test.go +++ b/internal/service/commit/extractsignature_test.go @@ -1,6 +1,7 @@ package commit import ( + "context" "io" "io/ioutil" "testing" @@ -8,7 +9,6 @@ import ( "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/commit/find_all_commits_test.go b/internal/service/commit/find_all_commits_test.go index e1e696b52..95a8082f1 100644 --- a/internal/service/commit/find_all_commits_test.go +++ b/internal/service/commit/find_all_commits_test.go @@ -1,6 +1,7 @@ package commit import ( + "context" "io" "testing" @@ -9,7 +10,6 @@ import ( "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" ) diff --git a/internal/service/commit/find_commit.go b/internal/service/commit/find_commit.go index a0a474e9f..de9c970d8 100644 --- a/internal/service/commit/find_commit.go +++ b/internal/service/commit/find_commit.go @@ -1,10 +1,11 @@ package commit import ( + "context" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/git/log" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/commit/find_commit_test.go b/internal/service/commit/find_commit_test.go index bdf8e35b2..12d730e69 100644 --- a/internal/service/commit/find_commit_test.go +++ b/internal/service/commit/find_commit_test.go @@ -1,6 +1,7 @@ package commit import ( + "context" "io/ioutil" "strings" "testing" @@ -12,7 +13,6 @@ import ( "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" diff --git a/internal/service/commit/isancestor.go b/internal/service/commit/isancestor.go index 4c54427fa..e6d35a11c 100644 --- a/internal/service/commit/isancestor.go +++ b/internal/service/commit/isancestor.go @@ -1,11 +1,12 @@ package commit import ( + "context" + grpc_logrus "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" log "github.com/sirupsen/logrus" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/commit/isancestor_test.go b/internal/service/commit/isancestor_test.go index 1d958ef97..d4c7af209 100644 --- a/internal/service/commit/isancestor_test.go +++ b/internal/service/commit/isancestor_test.go @@ -1,6 +1,7 @@ package commit import ( + "context" "fmt" "os/exec" "testing" @@ -9,7 +10,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/commit/languages.go b/internal/service/commit/languages.go index 052de5bf9..166ff5b8c 100644 --- a/internal/service/commit/languages.go +++ b/internal/service/commit/languages.go @@ -1,6 +1,7 @@ package commit import ( + "context" "io/ioutil" "sort" "strings" @@ -10,7 +11,6 @@ import ( "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" ) diff --git a/internal/service/commit/last_commit_for_path.go b/internal/service/commit/last_commit_for_path.go index 9cf65f39c..9d7015671 100644 --- a/internal/service/commit/last_commit_for_path.go +++ b/internal/service/commit/last_commit_for_path.go @@ -1,11 +1,11 @@ package commit import ( + "context" "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" ) diff --git a/internal/service/commit/last_commit_for_path_test.go b/internal/service/commit/last_commit_for_path_test.go index 33232e986..3552fc701 100644 --- a/internal/service/commit/last_commit_for_path_test.go +++ b/internal/service/commit/last_commit_for_path_test.go @@ -1,13 +1,13 @@ package commit import ( + "context" "testing" "github.com/golang/protobuf/ptypes/timestamp" "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/commit/list_commits_by_oid_test.go b/internal/service/commit/list_commits_by_oid_test.go index 2c994c9e2..af2edd962 100644 --- a/internal/service/commit/list_commits_by_oid_test.go +++ b/internal/service/commit/list_commits_by_oid_test.go @@ -1,13 +1,13 @@ package commit import ( + "context" "io" "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" ) func TestSuccessfulListCommitsByOidRequest(t *testing.T) { diff --git a/internal/service/commit/list_files_test.go b/internal/service/commit/list_files_test.go index d1eb82112..c2a702368 100644 --- a/internal/service/commit/list_files_test.go +++ b/internal/service/commit/list_files_test.go @@ -2,6 +2,7 @@ package commit import ( "bytes" + "context" "fmt" "io" "testing" @@ -9,7 +10,6 @@ import ( "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" ) 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 ed7e30dd5..d3d2cd3e0 100644 --- a/internal/service/commit/list_last_commits_for_tree_test.go +++ b/internal/service/commit/list_last_commits_for_tree_test.go @@ -1,13 +1,13 @@ package commit import ( + "context" "io" "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" ) diff --git a/internal/service/commit/raw_blame_test.go b/internal/service/commit/raw_blame_test.go index 034176c83..932b34e1c 100644 --- a/internal/service/commit/raw_blame_test.go +++ b/internal/service/commit/raw_blame_test.go @@ -1,6 +1,7 @@ package commit import ( + "context" "fmt" "io/ioutil" "testing" @@ -9,7 +10,6 @@ import ( "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" ) diff --git a/internal/service/commit/stats.go b/internal/service/commit/stats.go index 30605c808..b1b9628f1 100644 --- a/internal/service/commit/stats.go +++ b/internal/service/commit/stats.go @@ -1,10 +1,11 @@ package commit import ( + "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/tree_entries_test.go b/internal/service/commit/tree_entries_test.go index f496e49d2..5eb422499 100644 --- a/internal/service/commit/tree_entries_test.go +++ b/internal/service/commit/tree_entries_test.go @@ -1,6 +1,7 @@ package commit import ( + "context" "fmt" "io" "os" @@ -10,7 +11,6 @@ import ( "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/commit/tree_entry_test.go b/internal/service/commit/tree_entry_test.go index 5d9a34f13..d7a75d592 100644 --- a/internal/service/commit/tree_entry_test.go +++ b/internal/service/commit/tree_entry_test.go @@ -2,13 +2,13 @@ package commit import ( "bytes" + "context" "fmt" "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" ) diff --git a/internal/service/diff/commit_test.go b/internal/service/diff/commit_test.go index 6c0feb938..b1f1ca56c 100644 --- a/internal/service/diff/commit_test.go +++ b/internal/service/diff/commit_test.go @@ -2,6 +2,7 @@ package diff import ( "bytes" + "context" "fmt" "io" "testing" @@ -10,7 +11,6 @@ import ( "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" ) diff --git a/internal/service/diff/numstat_test.go b/internal/service/diff/numstat_test.go index cb38d17e8..ddebbf7c1 100644 --- a/internal/service/diff/numstat_test.go +++ b/internal/service/diff/numstat_test.go @@ -1,6 +1,7 @@ package diff import ( + "context" "io" "testing" @@ -8,7 +9,6 @@ import ( "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" ) diff --git a/internal/service/diff/raw.go b/internal/service/diff/raw.go index 73fde92e5..bbafc36ee 100644 --- a/internal/service/diff/raw.go +++ b/internal/service/diff/raw.go @@ -1,12 +1,12 @@ package diff import ( + "context" "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" ) diff --git a/internal/service/namespace/namespace.go b/internal/service/namespace/namespace.go index ef8abffe0..afd4caf87 100644 --- a/internal/service/namespace/namespace.go +++ b/internal/service/namespace/namespace.go @@ -1,12 +1,12 @@ package namespace import ( + "context" "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" ) diff --git a/internal/service/namespace/namespace_test.go b/internal/service/namespace/namespace_test.go index f5ac3471f..a01fe0b0a 100644 --- a/internal/service/namespace/namespace_test.go +++ b/internal/service/namespace/namespace_test.go @@ -1,6 +1,7 @@ package namespace import ( + "context" "io/ioutil" "os" "testing" @@ -10,7 +11,6 @@ import ( "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" ) diff --git a/internal/service/operations/branches.go b/internal/service/operations/branches.go index 9a8840ded..943da6ee4 100644 --- a/internal/service/operations/branches.go +++ b/internal/service/operations/branches.go @@ -1,9 +1,10 @@ package operations import ( + "context" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/operations/branches_test.go b/internal/service/operations/branches_test.go index 9c41aac21..7b6597afd 100644 --- a/internal/service/operations/branches_test.go +++ b/internal/service/operations/branches_test.go @@ -1,6 +1,7 @@ package operations import ( + "context" "os" "os/exec" "testing" @@ -9,7 +10,6 @@ import ( "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" ) diff --git a/internal/service/operations/cherry_pick.go b/internal/service/operations/cherry_pick.go index eaea55558..ef0e9cb00 100644 --- a/internal/service/operations/cherry_pick.go +++ b/internal/service/operations/cherry_pick.go @@ -1,9 +1,10 @@ package operations import ( + "context" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/operations/merge.go b/internal/service/operations/merge.go index 2e9470f5a..9fa3888b3 100644 --- a/internal/service/operations/merge.go +++ b/internal/service/operations/merge.go @@ -1,11 +1,11 @@ package operations import ( + "context" "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" ) diff --git a/internal/service/operations/rebase.go b/internal/service/operations/rebase.go index 1fa5ea341..abd012396 100644 --- a/internal/service/operations/rebase.go +++ b/internal/service/operations/rebase.go @@ -1,11 +1,11 @@ package operations import ( + "context" "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" ) diff --git a/internal/service/operations/revert.go b/internal/service/operations/revert.go index 2c501c449..8a9a78524 100644 --- a/internal/service/operations/revert.go +++ b/internal/service/operations/revert.go @@ -1,9 +1,10 @@ package operations import ( + "context" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/operations/squash.go b/internal/service/operations/squash.go index 8e007f693..83207907a 100644 --- a/internal/service/operations/squash.go +++ b/internal/service/operations/squash.go @@ -1,11 +1,11 @@ package operations import ( + "context" "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" ) diff --git a/internal/service/operations/submodules.go b/internal/service/operations/submodules.go index 3d37efec8..7bffd8d47 100644 --- a/internal/service/operations/submodules.go +++ b/internal/service/operations/submodules.go @@ -1,12 +1,12 @@ package operations import ( + "context" "fmt" "regexp" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/operations/tags.go b/internal/service/operations/tags.go index 09827d81a..585addeac 100644 --- a/internal/service/operations/tags.go +++ b/internal/service/operations/tags.go @@ -1,9 +1,10 @@ package operations import ( + "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/update_branches_test.go b/internal/service/operations/update_branches_test.go index 56be3faf2..8dd910dc9 100644 --- a/internal/service/operations/update_branches_test.go +++ b/internal/service/operations/update_branches_test.go @@ -1,6 +1,7 @@ package operations import ( + "context" "os" "testing" @@ -8,7 +9,6 @@ import ( "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" ) diff --git a/internal/service/ref/branches.go b/internal/service/ref/branches.go index 09aa25189..603d6d6fd 100644 --- a/internal/service/ref/branches.go +++ b/internal/service/ref/branches.go @@ -2,6 +2,7 @@ package ref import ( "bufio" + "context" "io" "strings" @@ -9,7 +10,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/git/log" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/ref/delete_refs.go b/internal/service/ref/delete_refs.go index 27d9f9211..34fc0c2aa 100644 --- a/internal/service/ref/delete_refs.go +++ b/internal/service/ref/delete_refs.go @@ -1,11 +1,11 @@ package ref import ( + "context" "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" ) diff --git a/internal/service/ref/refexists.go b/internal/service/ref/refexists.go index e94ce97fa..31f7ae05f 100644 --- a/internal/service/ref/refexists.go +++ b/internal/service/ref/refexists.go @@ -1,6 +1,7 @@ package ref import ( + "context" "fmt" "strings" @@ -8,7 +9,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/command" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/helper" - "golang.org/x/net/context" ) // RefExists returns true if the given reference exists. The ref must start with the string `ref/` diff --git a/internal/service/ref/refname.go b/internal/service/ref/refname.go index ad6c488df..ac4e3ca2d 100644 --- a/internal/service/ref/refname.go +++ b/internal/service/ref/refname.go @@ -2,13 +2,13 @@ package ref import ( "bufio" + "context" "fmt" "strings" "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" ) // 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 497135a25..e9501de03 100644 --- a/internal/service/ref/refname_test.go +++ b/internal/service/ref/refname_test.go @@ -1,12 +1,12 @@ package ref import ( + "context" "testing" "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" ) diff --git a/internal/service/ref/refs.go b/internal/service/ref/refs.go index dadf91457..08334be86 100644 --- a/internal/service/ref/refs.go +++ b/internal/service/ref/refs.go @@ -3,6 +3,7 @@ package ref import ( "bufio" "bytes" + "context" "fmt" "strings" @@ -12,7 +13,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/helper/lines" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "golang.org/x/net/context" ) var ( diff --git a/internal/service/ref/refs_test.go b/internal/service/ref/refs_test.go index f675c2c9a..4648b56d0 100644 --- a/internal/service/ref/refs_test.go +++ b/internal/service/ref/refs_test.go @@ -2,6 +2,7 @@ package ref import ( "bytes" + "context" "io" "io/ioutil" "strings" @@ -13,7 +14,6 @@ import ( "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" ) diff --git a/internal/service/ref/remote_branches_test.go b/internal/service/ref/remote_branches_test.go index efb411342..1d1be32ad 100644 --- a/internal/service/ref/remote_branches_test.go +++ b/internal/service/ref/remote_branches_test.go @@ -1,6 +1,7 @@ package ref import ( + "context" "io" "testing" @@ -8,7 +9,6 @@ import ( "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" ) diff --git a/internal/service/remote/fetch_internal_remote.go b/internal/service/remote/fetch_internal_remote.go index 15961aa29..8ca4d6ab0 100644 --- a/internal/service/remote/fetch_internal_remote.go +++ b/internal/service/remote/fetch_internal_remote.go @@ -1,11 +1,11 @@ package remote import ( + "context" "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" ) diff --git a/internal/service/remote/find_remote_root_ref.go b/internal/service/remote/find_remote_root_ref.go index 56602be8d..fb6bcec4d 100644 --- a/internal/service/remote/find_remote_root_ref.go +++ b/internal/service/remote/find_remote_root_ref.go @@ -2,11 +2,11 @@ package remote import ( "bufio" + "context" "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" ) diff --git a/internal/service/remote/remotes.go b/internal/service/remote/remotes.go index 45fda5caa..c075750d6 100644 --- a/internal/service/remote/remotes.go +++ b/internal/service/remote/remotes.go @@ -2,6 +2,7 @@ package remote import ( "bytes" + "context" "fmt" "io/ioutil" "strings" @@ -9,7 +10,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/remote/remotes_test.go b/internal/service/remote/remotes_test.go index b38f9398e..b90d8c8b4 100644 --- a/internal/service/remote/remotes_test.go +++ b/internal/service/remote/remotes_test.go @@ -2,6 +2,7 @@ package remote import ( "bytes" + "context" "fmt" "io" "net/http" @@ -11,7 +12,6 @@ import ( "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/remote/update_remote_mirror_test.go b/internal/service/remote/update_remote_mirror_test.go index dfa173829..75ee77f4a 100644 --- a/internal/service/remote/update_remote_mirror_test.go +++ b/internal/service/remote/update_remote_mirror_test.go @@ -1,13 +1,13 @@ package remote import ( + "context" "strings" "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" ) diff --git a/internal/service/repository/apply_gitattributes.go b/internal/service/repository/apply_gitattributes.go index e7103f03b..9868f4b83 100644 --- a/internal/service/repository/apply_gitattributes.go +++ b/internal/service/repository/apply_gitattributes.go @@ -1,6 +1,7 @@ package repository import ( + "context" "fmt" "io" "io/ioutil" @@ -11,7 +12,6 @@ import ( "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" ) diff --git a/internal/service/repository/calculate_checksum.go b/internal/service/repository/calculate_checksum.go index d58a6627d..b0804d036 100644 --- a/internal/service/repository/calculate_checksum.go +++ b/internal/service/repository/calculate_checksum.go @@ -3,6 +3,7 @@ package repository import ( "bufio" "bytes" + "context" "crypto/sha1" "encoding/hex" "math/big" @@ -13,7 +14,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/git/alternates" "gitlab.com/gitlab-org/gitaly/internal/helper" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/repository/cleanup.go b/internal/service/repository/cleanup.go index 99fd9d343..9cae1580b 100644 --- a/internal/service/repository/cleanup.go +++ b/internal/service/repository/cleanup.go @@ -1,6 +1,7 @@ package repository import ( + "context" "io/ioutil" "os" "path/filepath" @@ -9,7 +10,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/helper" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/repository/config.go b/internal/service/repository/config.go index 30314f432..d189ce9b6 100644 --- a/internal/service/repository/config.go +++ b/internal/service/repository/config.go @@ -1,11 +1,12 @@ package repository import ( + "context" + "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" ) diff --git a/internal/service/repository/create.go b/internal/service/repository/create.go index 58928b166..397b00238 100644 --- a/internal/service/repository/create.go +++ b/internal/service/repository/create.go @@ -1,9 +1,10 @@ package repository import ( + "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_from_snapshot.go b/internal/service/repository/create_from_snapshot.go index 2be275f38..f307a8d3f 100644 --- a/internal/service/repository/create_from_snapshot.go +++ b/internal/service/repository/create_from_snapshot.go @@ -1,6 +1,7 @@ package repository import ( + "context" "net" "net/http" "os" @@ -13,7 +14,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/tempdir" "gitlab.com/gitlab-org/labkit/correlation" "gitlab.com/gitlab-org/labkit/tracing" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/repository/create_from_url.go b/internal/service/repository/create_from_url.go index 7274bf7f0..c17b9ec3a 100644 --- a/internal/service/repository/create_from_url.go +++ b/internal/service/repository/create_from_url.go @@ -1,13 +1,13 @@ package repository import ( + "context" "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" ) diff --git a/internal/service/repository/fetch.go b/internal/service/repository/fetch.go index f09488893..58102c56f 100644 --- a/internal/service/repository/fetch.go +++ b/internal/service/repository/fetch.go @@ -1,9 +1,10 @@ package repository import ( + "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 6f3c35f3d..b29db8b56 100644 --- a/internal/service/repository/fetch_remote.go +++ b/internal/service/repository/fetch_remote.go @@ -1,11 +1,12 @@ package repository import ( + "context" + grpc_logrus "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" log "github.com/sirupsen/logrus" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/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/fork.go b/internal/service/repository/fork.go index 3cfef7738..fedef0227 100644 --- a/internal/service/repository/fork.go +++ b/internal/service/repository/fork.go @@ -1,6 +1,7 @@ package repository import ( + "context" "fmt" "os" "path" @@ -10,7 +11,6 @@ import ( "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" ) diff --git a/internal/service/repository/fsck.go b/internal/service/repository/fsck.go index 2e4f4195e..b92ca8cf5 100644 --- a/internal/service/repository/fsck.go +++ b/internal/service/repository/fsck.go @@ -2,11 +2,11 @@ package repository import ( "bytes" + "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/gc.go b/internal/service/repository/gc.go index cd06bce0e..128e343c7 100644 --- a/internal/service/repository/gc.go +++ b/internal/service/repository/gc.go @@ -1,6 +1,7 @@ package repository import ( + "context" "errors" "fmt" "io/ioutil" @@ -14,7 +15,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/git/catfile" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/helper/housekeeping" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/repository/license.go b/internal/service/repository/license.go index 584cdba6b..fcc0e4916 100644 --- a/internal/service/repository/license.go +++ b/internal/service/repository/license.go @@ -1,9 +1,10 @@ package repository import ( + "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/merge_base.go b/internal/service/repository/merge_base.go index 192a00c7c..68850ce70 100644 --- a/internal/service/repository/merge_base.go +++ b/internal/service/repository/merge_base.go @@ -1,12 +1,12 @@ package repository import ( + "context" "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" ) diff --git a/internal/service/repository/rebase_in_progress.go b/internal/service/repository/rebase_in_progress.go index 2fff4d7f6..3cb5d8242 100644 --- a/internal/service/repository/rebase_in_progress.go +++ b/internal/service/repository/rebase_in_progress.go @@ -1,6 +1,7 @@ package repository import ( + "context" "fmt" "os" "path" @@ -10,7 +11,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/helper" "gitlab.com/gitlab-org/gitaly/internal/helper/housekeeping" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/repository/repack.go b/internal/service/repository/repack.go index 075577fc6..e7a08f433 100644 --- a/internal/service/repository/repack.go +++ b/internal/service/repository/repack.go @@ -1,11 +1,12 @@ package repository import ( + "context" + grpc_logrus "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" log "github.com/sirupsen/logrus" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/service/repository/repository.go b/internal/service/repository/repository.go index 2fb780f5d..a5e5ec468 100644 --- a/internal/service/repository/repository.go +++ b/internal/service/repository/repository.go @@ -1,12 +1,12 @@ package repository import ( + "context" "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" ) diff --git a/internal/service/repository/repository_test.go b/internal/service/repository/repository_test.go index 7d4998299..840cf24e6 100644 --- a/internal/service/repository/repository_test.go +++ b/internal/service/repository/repository_test.go @@ -1,6 +1,7 @@ package repository import ( + "context" "io/ioutil" "os" "path" @@ -11,7 +12,6 @@ import ( "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" ) diff --git a/internal/service/repository/size.go b/internal/service/repository/size.go index 7cf3a3e18..937308cdc 100644 --- a/internal/service/repository/size.go +++ b/internal/service/repository/size.go @@ -2,6 +2,7 @@ package repository import ( "bytes" + "context" "fmt" "io/ioutil" "os/exec" @@ -11,7 +12,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/command" "gitlab.com/gitlab-org/gitaly/internal/helper" - "golang.org/x/net/context" ) 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 6dc9a37b3..15fce8d2e 100644 --- a/internal/service/repository/size_test.go +++ b/internal/service/repository/size_test.go @@ -1,6 +1,7 @@ package repository import ( + "context" "os" "path" "testing" @@ -9,7 +10,6 @@ import ( "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/config" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/repository/squash_in_progress.go b/internal/service/repository/squash_in_progress.go index 81b6441fd..87ebaaeb6 100644 --- a/internal/service/repository/squash_in_progress.go +++ b/internal/service/repository/squash_in_progress.go @@ -1,12 +1,12 @@ package repository import ( + "context" "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" ) diff --git a/internal/service/repository/util.go b/internal/service/repository/util.go index f859358fc..05772034a 100644 --- a/internal/service/repository/util.go +++ b/internal/service/repository/util.go @@ -1,11 +1,11 @@ package repository import ( + "context" "fmt" "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 0a6b3d279..e80ced88b 100644 --- a/internal/service/repository/write_config.go +++ b/internal/service/repository/write_config.go @@ -1,9 +1,10 @@ package repository import ( + "context" + "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "golang.org/x/net/context" ) func (s *server) WriteConfig(ctx context.Context, req *gitalypb.WriteConfigRequest) (*gitalypb.WriteConfigResponse, error) { diff --git a/internal/service/repository/write_ref.go b/internal/service/repository/write_ref.go index 600646eb8..1d4fe269d 100644 --- a/internal/service/repository/write_ref.go +++ b/internal/service/repository/write_ref.go @@ -2,13 +2,13 @@ package repository import ( "bytes" + "context" "fmt" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/git/updateref" "gitlab.com/gitlab-org/gitaly/internal/helper" - "golang.org/x/net/context" ) func (s *server) WriteRef(ctx context.Context, req *gitalypb.WriteRefRequest) (*gitalypb.WriteRefResponse, error) { diff --git a/internal/service/server/info.go b/internal/service/server/info.go index 323014ab3..4c4762fbd 100644 --- a/internal/service/server/info.go +++ b/internal/service/server/info.go @@ -1,6 +1,7 @@ package server import ( + "context" "io/ioutil" "os" "path" @@ -9,7 +10,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/config" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/version" - "golang.org/x/net/context" ) func (s *server) ServerInfo(ctx context.Context, in *gitalypb.ServerInfoRequest) (*gitalypb.ServerInfoResponse, error) { diff --git a/internal/service/smarthttp/inforefs_test.go b/internal/service/smarthttp/inforefs_test.go index e2ed888d4..939b56826 100644 --- a/internal/service/smarthttp/inforefs_test.go +++ b/internal/service/smarthttp/inforefs_test.go @@ -1,6 +1,7 @@ package smarthttp import ( + "context" "fmt" "io" "io/ioutil" @@ -13,7 +14,6 @@ import ( "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" ) diff --git a/internal/service/smarthttp/receive_pack_test.go b/internal/service/smarthttp/receive_pack_test.go index 8e51b6aa0..0503b669b 100644 --- a/internal/service/smarthttp/receive_pack_test.go +++ b/internal/service/smarthttp/receive_pack_test.go @@ -2,6 +2,7 @@ package smarthttp import ( "bytes" + "context" "fmt" "io" "io/ioutil" @@ -18,7 +19,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/git/hooks" "gitlab.com/gitlab-org/gitaly/internal/testhelper" "gitlab.com/gitlab-org/gitaly/streamio" - "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/smarthttp/upload_pack_test.go b/internal/service/smarthttp/upload_pack_test.go index 3c44fcd45..b8bbb1a57 100644 --- a/internal/service/smarthttp/upload_pack_test.go +++ b/internal/service/smarthttp/upload_pack_test.go @@ -2,6 +2,7 @@ package smarthttp import ( "bytes" + "context" "encoding/binary" "fmt" "io" @@ -20,7 +21,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" ) diff --git a/internal/service/ssh/receive_pack_test.go b/internal/service/ssh/receive_pack_test.go index a40a1ec1b..f4237646d 100644 --- a/internal/service/ssh/receive_pack_test.go +++ b/internal/service/ssh/receive_pack_test.go @@ -2,6 +2,7 @@ package ssh import ( "bytes" + "context" "fmt" "io/ioutil" "os" @@ -18,7 +19,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/git/hooks" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/ssh/upload_archive_test.go b/internal/service/ssh/upload_archive_test.go index 8264b6314..59b2a9d94 100644 --- a/internal/service/ssh/upload_archive_test.go +++ b/internal/service/ssh/upload_archive_test.go @@ -1,6 +1,7 @@ package ssh import ( + "context" "fmt" "os" "os/exec" @@ -10,7 +11,6 @@ import ( "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/ssh/upload_pack_test.go b/internal/service/ssh/upload_pack_test.go index a52cc99ae..a36c2d848 100644 --- a/internal/service/ssh/upload_pack_test.go +++ b/internal/service/ssh/upload_pack_test.go @@ -2,6 +2,7 @@ package ssh import ( "bytes" + "context" "fmt" "os" "os/exec" @@ -15,7 +16,6 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/config" "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "golang.org/x/net/context" "google.golang.org/grpc/codes" ) diff --git a/internal/service/storage/deleteall.go b/internal/service/storage/deleteall.go index 1a54ce1b1..436bbdc97 100644 --- a/internal/service/storage/deleteall.go +++ b/internal/service/storage/deleteall.go @@ -1,6 +1,7 @@ package storage import ( + "context" "io" "os" "path" @@ -10,7 +11,6 @@ import ( "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" ) diff --git a/internal/service/wiki/delete_page.go b/internal/service/wiki/delete_page.go index cd1ecbaff..8d0a5b70b 100644 --- a/internal/service/wiki/delete_page.go +++ b/internal/service/wiki/delete_page.go @@ -1,11 +1,11 @@ package wiki import ( + "context" "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" ) -- cgit v1.2.3