diff options
author | Pavlo Strokov <pstrokov@gitlab.com> | 2021-07-27 17:54:27 +0300 |
---|---|---|
committer | Pavlo Strokov <pstrokov@gitlab.com> | 2021-07-28 16:01:56 +0300 |
commit | 9bbb9ca9aa431a1b7965fd9a2c71cd479dd7e9a7 (patch) | |
tree | 64223744aa0e446d44b0eb93c55b018e580427cc /internal/cache | |
parent | 21ea470ba6370188bc16be618cc3543cc51ad10c (diff) |
lint: Fix deprecated import github.com/golang/protobuf/proto
The dependency github.com/golang/protobuf is deprecated and should
be replaced with google.golang.org/protobuf.
This change replaces usage of the proto package. The packages have
incompatible API that is why the code changes were done to migrate.
The exclusion rule removed from the golanci-lint tool configuration
file to prevent future use of the deprecated package.
Diffstat (limited to 'internal/cache')
-rw-r--r-- | internal/cache/cache.go | 2 | ||||
-rw-r--r-- | internal/cache/diskcache.go | 2 | ||||
-rw-r--r-- | internal/cache/keyer.go | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/internal/cache/cache.go b/internal/cache/cache.go index e9982ebb9..82ad0a803 100644 --- a/internal/cache/cache.go +++ b/internal/cache/cache.go @@ -4,8 +4,8 @@ import ( "context" "io" - "github.com/golang/protobuf/proto" "gitlab.com/gitlab-org/gitaly/v14/proto/go/gitalypb" + "google.golang.org/protobuf/proto" ) // Cache is a stream-oriented cache which stores RPC responses keyed by protobuf requests. diff --git a/internal/cache/diskcache.go b/internal/cache/diskcache.go index 35570ef40..f887b725c 100644 --- a/internal/cache/diskcache.go +++ b/internal/cache/diskcache.go @@ -8,13 +8,13 @@ import ( "path/filepath" "sync" - "github.com/golang/protobuf/proto" "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus/ctxlogrus" "github.com/prometheus/client_golang/prometheus" "gitlab.com/gitlab-org/gitaly/v14/internal/gitaly/config" "gitlab.com/gitlab-org/gitaly/v14/internal/gitaly/storage" "gitlab.com/gitlab-org/gitaly/v14/internal/safe" "gitlab.com/gitlab-org/gitaly/v14/proto/go/gitalypb" + "google.golang.org/protobuf/proto" ) // maps a cache path to the number of active writers diff --git a/internal/cache/keyer.go b/internal/cache/keyer.go index b5b45ea6f..eb545e822 100644 --- a/internal/cache/keyer.go +++ b/internal/cache/keyer.go @@ -13,7 +13,6 @@ import ( "strings" "time" - "github.com/golang/protobuf/proto" "github.com/google/uuid" "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus/ctxlogrus" "gitlab.com/gitlab-org/gitaly/v14/internal/gitaly/storage" @@ -22,6 +21,7 @@ import ( "gitlab.com/gitlab-org/gitaly/v14/internal/version" "gitlab.com/gitlab-org/gitaly/v14/proto/go/gitalypb" "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) var ( |