diff --git a/README.md b/README.md index 04b316c29..beab0148c 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ some of them itself, but also will link to useful external repos. `middleware` itself provides support for chaining interceptors, here's an example: ```go -import "github.com/grpc-ecosystem/go-grpc-middleware" +import "github.com/grpc-ecosystem/go-grpc-middleware/v2" myServer := grpc.NewServer( grpc.StreamInterceptor(middleware.ChainStreamServer( diff --git a/auth/auth.go b/auth/auth.go index 1269f17cd..4081fa6e3 100644 --- a/auth/auth.go +++ b/auth/auth.go @@ -6,7 +6,7 @@ package auth import ( "context" - middleware "github.com/grpc-ecosystem/go-grpc-middleware" + middleware "github.com/grpc-ecosystem/go-grpc-middleware/v2" "google.golang.org/grpc" ) diff --git a/auth/auth_test.go b/auth/auth_test.go index ece1bde95..91d088b26 100644 --- a/auth/auth_test.go +++ b/auth/auth_test.go @@ -9,10 +9,10 @@ import ( "testing" "time" - "github.com/grpc-ecosystem/go-grpc-middleware/auth" - "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting" - pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto" - "github.com/grpc-ecosystem/go-grpc-middleware/util/metautils" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/auth" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting" + pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/util/metautils" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" diff --git a/auth/examples_test.go b/auth/examples_test.go index 8d5861a46..9d68a0471 100644 --- a/auth/examples_test.go +++ b/auth/examples_test.go @@ -3,8 +3,8 @@ package auth_test import ( "context" - "github.com/grpc-ecosystem/go-grpc-middleware/auth" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/auth" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/auth/metadata.go b/auth/metadata.go index 7cc5a6969..c6b10cf61 100644 --- a/auth/metadata.go +++ b/auth/metadata.go @@ -7,7 +7,7 @@ import ( "context" "strings" - "github.com/grpc-ecosystem/go-grpc-middleware/util/metautils" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/util/metautils" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/auth/metadata_test.go b/auth/metadata_test.go index a844a338f..1c3d42ca3 100644 --- a/auth/metadata_test.go +++ b/auth/metadata_test.go @@ -7,7 +7,7 @@ import ( "context" "testing" - "github.com/grpc-ecosystem/go-grpc-middleware/util/metautils" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/util/metautils" "github.com/stretchr/testify/assert" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" diff --git a/go.mod b/go.mod index 71b6f1603..e94fe5b0d 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,6 @@ -module github.com/grpc-ecosystem/go-grpc-middleware +module github.com/grpc-ecosystem/go-grpc-middleware/v2 + +go 1.14 require ( github.com/gogo/protobuf v1.2.1 @@ -10,5 +12,3 @@ require ( google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 // indirect google.golang.org/grpc v1.19.0 ) - -go 1.13 diff --git a/grpctesting/interceptor_suite.go b/grpctesting/interceptor_suite.go index 51cbc2658..d166e73e4 100644 --- a/grpctesting/interceptor_suite.go +++ b/grpctesting/interceptor_suite.go @@ -11,7 +11,7 @@ import ( "runtime" "time" - pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto" + pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" "google.golang.org/grpc" diff --git a/grpctesting/pingservice.go b/grpctesting/pingservice.go index f0432981c..c24657058 100644 --- a/grpctesting/pingservice.go +++ b/grpctesting/pingservice.go @@ -12,7 +12,7 @@ import ( "io" "testing" - pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto" + pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/interceptors/client_test.go b/interceptors/client_test.go index 2d551747d..c5fd29d78 100644 --- a/interceptors/client_test.go +++ b/interceptors/client_test.go @@ -11,8 +11,8 @@ import ( "testing" "time" - "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting" - pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting" + pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" "google.golang.org/grpc" diff --git a/interceptors/logging/interceptors.go b/interceptors/logging/interceptors.go index 1908fa794..425c83500 100644 --- a/interceptors/logging/interceptors.go +++ b/interceptors/logging/interceptors.go @@ -6,8 +6,8 @@ import ( "io" "time" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags" "google.golang.org/grpc" ) diff --git a/interceptors/logging/interceptors_test.go b/interceptors/logging/interceptors_test.go index 1cbb5800a..7c0de402c 100644 --- a/interceptors/logging/interceptors_test.go +++ b/interceptors/logging/interceptors_test.go @@ -9,18 +9,18 @@ import ( "sync" "testing" - middleware "github.com/grpc-ecosystem/go-grpc-middleware" - "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/logging" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags" + middleware "github.com/grpc-ecosystem/go-grpc-middleware/v2" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" "google.golang.org/grpc" "google.golang.org/grpc/codes" - pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto" + pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto" ) var ( diff --git a/interceptors/logging/logging.go b/interceptors/logging/logging.go index 21c342765..2e4aa27c2 100644 --- a/interceptors/logging/logging.go +++ b/interceptors/logging/logging.go @@ -8,7 +8,7 @@ import ( "io" "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/interceptors/logging/payload.go b/interceptors/logging/payload.go index 621ad987f..2ad547038 100644 --- a/interceptors/logging/payload.go +++ b/interceptors/logging/payload.go @@ -8,8 +8,8 @@ import ( "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags" "google.golang.org/grpc" ) diff --git a/interceptors/logging/payload_test.go b/interceptors/logging/payload_test.go index b427a3217..74a3696e8 100644 --- a/interceptors/logging/payload_test.go +++ b/interceptors/logging/payload_test.go @@ -8,12 +8,12 @@ import ( "strings" "testing" - middleware "github.com/grpc-ecosystem/go-grpc-middleware" - "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting" - pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/logging" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags" + middleware "github.com/grpc-ecosystem/go-grpc-middleware/v2" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting" + pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" diff --git a/interceptors/ratelimit/examples_test.go b/interceptors/ratelimit/examples_test.go index a82c532ff..85d37fc82 100644 --- a/interceptors/ratelimit/examples_test.go +++ b/interceptors/ratelimit/examples_test.go @@ -1,8 +1,8 @@ package ratelimit_test import ( - middleware "github.com/grpc-ecosystem/go-grpc-middleware" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/ratelimit" + middleware "github.com/grpc-ecosystem/go-grpc-middleware/v2" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/ratelimit" "google.golang.org/grpc" ) diff --git a/interceptors/recovery/examples_test.go b/interceptors/recovery/examples_test.go index adcbe4b1d..716f44234 100644 --- a/interceptors/recovery/examples_test.go +++ b/interceptors/recovery/examples_test.go @@ -4,8 +4,8 @@ package recovery_test import ( - middleware "github.com/grpc-ecosystem/go-grpc-middleware" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/recovery" + middleware "github.com/grpc-ecosystem/go-grpc-middleware/v2" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/recovery" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/interceptors/recovery/interceptors_test.go b/interceptors/recovery/interceptors_test.go index 5922e1a6b..46bbeea85 100644 --- a/interceptors/recovery/interceptors_test.go +++ b/interceptors/recovery/interceptors_test.go @@ -7,10 +7,10 @@ import ( "context" "testing" - middleware "github.com/grpc-ecosystem/go-grpc-middleware" - "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting" - pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/recovery" + middleware "github.com/grpc-ecosystem/go-grpc-middleware/v2" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting" + pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/recovery" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" diff --git a/interceptors/retry/backoff.go b/interceptors/retry/backoff.go index f15062c3e..3b48d548a 100644 --- a/interceptors/retry/backoff.go +++ b/interceptors/retry/backoff.go @@ -6,7 +6,7 @@ package retry import ( "time" - "github.com/grpc-ecosystem/go-grpc-middleware/util/backoffutils" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/util/backoffutils" ) // BackoffLinear is very simple: it waits for a fixed period of time between calls. diff --git a/interceptors/retry/examples_test.go b/interceptors/retry/examples_test.go index 0a890de91..312093dd1 100644 --- a/interceptors/retry/examples_test.go +++ b/interceptors/retry/examples_test.go @@ -9,8 +9,8 @@ import ( "io" "time" - pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/retry" + pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/retry" "google.golang.org/grpc" "google.golang.org/grpc/codes" ) diff --git a/interceptors/retry/retry.go b/interceptors/retry/retry.go index 893373f44..311765ad1 100644 --- a/interceptors/retry/retry.go +++ b/interceptors/retry/retry.go @@ -10,7 +10,7 @@ import ( "sync" "time" - "github.com/grpc-ecosystem/go-grpc-middleware/util/metautils" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/util/metautils" "golang.org/x/net/trace" "google.golang.org/grpc" "google.golang.org/grpc/codes" diff --git a/interceptors/retry/retry_test.go b/interceptors/retry/retry_test.go index 664452e55..95abe3882 100644 --- a/interceptors/retry/retry_test.go +++ b/interceptors/retry/retry_test.go @@ -10,10 +10,10 @@ import ( "testing" "time" - middleware "github.com/grpc-ecosystem/go-grpc-middleware" - "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting" - pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/retry" + middleware "github.com/grpc-ecosystem/go-grpc-middleware/v2" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting" + pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/retry" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" diff --git a/interceptors/server_test.go b/interceptors/server_test.go index 51cba983e..025498b93 100644 --- a/interceptors/server_test.go +++ b/interceptors/server_test.go @@ -11,10 +11,10 @@ import ( "testing" "time" - "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting" "google.golang.org/grpc/status" - pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto" + pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" "google.golang.org/grpc" diff --git a/interceptors/tags/examples_test.go b/interceptors/tags/examples_test.go index b62bb4d9f..c4332d7ad 100644 --- a/interceptors/tags/examples_test.go +++ b/interceptors/tags/examples_test.go @@ -1,7 +1,7 @@ package tags_test import ( - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags" "google.golang.org/grpc" ) diff --git a/interceptors/tags/fieldextractor_test.go b/interceptors/tags/fieldextractor_test.go index c7797dce2..cf6fff4d2 100644 --- a/interceptors/tags/fieldextractor_test.go +++ b/interceptors/tags/fieldextractor_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - pb_gogotestproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/gogotestproto" - pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags" + pb_gogotestproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/gogotestproto" + pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/interceptors/tags/interceptors.go b/interceptors/tags/interceptors.go index 449ff2d14..ccc9d2f3c 100644 --- a/interceptors/tags/interceptors.go +++ b/interceptors/tags/interceptors.go @@ -7,7 +7,7 @@ import ( "context" "time" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors" "google.golang.org/grpc" "google.golang.org/grpc/peer" ) diff --git a/interceptors/tags/interceptors_test.go b/interceptors/tags/interceptors_test.go index 8a95f0549..cdc4687f5 100644 --- a/interceptors/tags/interceptors_test.go +++ b/interceptors/tags/interceptors_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - grpctesting "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting" - pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags" + grpctesting "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting" + pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" diff --git a/interceptors/tracing/client.go b/interceptors/tracing/client.go index 22822400b..2ab6d0d60 100644 --- a/interceptors/tracing/client.go +++ b/interceptors/tracing/client.go @@ -8,8 +8,8 @@ import ( "io" "time" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors" - "github.com/grpc-ecosystem/go-grpc-middleware/util/metautils" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/util/metautils" "github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go/ext" "github.com/opentracing/opentracing-go/log" diff --git a/interceptors/tracing/id_extract.go b/interceptors/tracing/id_extract.go index 426ab1f40..beba6e864 100644 --- a/interceptors/tracing/id_extract.go +++ b/interceptors/tracing/id_extract.go @@ -3,7 +3,7 @@ package tracing import ( "strings" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags" "github.com/opentracing/opentracing-go" "google.golang.org/grpc/grpclog" ) diff --git a/interceptors/tracing/interceptors_test.go b/interceptors/tracing/interceptors_test.go index 26114ca98..7ae50b0af 100644 --- a/interceptors/tracing/interceptors_test.go +++ b/interceptors/tracing/interceptors_test.go @@ -13,7 +13,7 @@ import ( "strings" "testing" - middleware "github.com/grpc-ecosystem/go-grpc-middleware" + middleware "github.com/grpc-ecosystem/go-grpc-middleware/v2" "github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go/mocktracer" "github.com/stretchr/testify/assert" @@ -22,10 +22,10 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" - "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting" - pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tracing" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting" + pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tracing" ) var ( diff --git a/interceptors/tracing/server.go b/interceptors/tracing/server.go index 981f24754..3b4fc7f4e 100644 --- a/interceptors/tracing/server.go +++ b/interceptors/tracing/server.go @@ -7,9 +7,9 @@ import ( "context" "time" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags" - "github.com/grpc-ecosystem/go-grpc-middleware/util/metautils" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/util/metautils" "github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go/ext" "github.com/opentracing/opentracing-go/log" diff --git a/interceptors/validator/validator_test.go b/interceptors/validator/validator_test.go index 468dca950..afe984e46 100644 --- a/interceptors/validator/validator_test.go +++ b/interceptors/validator/validator_test.go @@ -7,9 +7,9 @@ import ( "io" "testing" - "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting" - pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/validator" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting" + pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/validator" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" diff --git a/providers/kit/examples_test.go b/providers/kit/examples_test.go index 101647f51..ac3d07c47 100644 --- a/providers/kit/examples_test.go +++ b/providers/kit/examples_test.go @@ -4,10 +4,10 @@ import ( "context" "github.com/go-kit/kit/log" - middleware "github.com/grpc-ecosystem/go-grpc-middleware" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/logging" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags" - "github.com/grpc-ecosystem/go-grpc-middleware/providers/kit" + middleware "github.com/grpc-ecosystem/go-grpc-middleware/v2" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/providers/kit" "google.golang.org/grpc" ) diff --git a/providers/kit/logger.go b/providers/kit/logger.go index 28c702378..5c02873d8 100644 --- a/providers/kit/logger.go +++ b/providers/kit/logger.go @@ -5,7 +5,7 @@ import ( "github.com/go-kit/kit/log" "github.com/go-kit/kit/log/level" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/logging" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging" ) type Logger struct { diff --git a/providers/logrus/examples_test.go b/providers/logrus/examples_test.go index e93d4c97b..2c4dcac1b 100644 --- a/providers/logrus/examples_test.go +++ b/providers/logrus/examples_test.go @@ -3,10 +3,10 @@ package logrus_test import ( "context" - middleware "github.com/grpc-ecosystem/go-grpc-middleware" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/logging" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags" - grpclogrus "github.com/grpc-ecosystem/go-grpc-middleware/providers/logrus" + middleware "github.com/grpc-ecosystem/go-grpc-middleware/v2" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags" + grpclogrus "github.com/grpc-ecosystem/go-grpc-middleware/v2/providers/logrus" "github.com/sirupsen/logrus" "google.golang.org/grpc" ) diff --git a/providers/logrus/logger.go b/providers/logrus/logger.go index ac1b7335e..c478978ba 100644 --- a/providers/logrus/logger.go +++ b/providers/logrus/logger.go @@ -3,7 +3,7 @@ package logrus import ( "fmt" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/logging" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging" "github.com/sirupsen/logrus" ) diff --git a/providers/zap/examples_test.go b/providers/zap/examples_test.go index c579f7155..5ce126404 100644 --- a/providers/zap/examples_test.go +++ b/providers/zap/examples_test.go @@ -3,10 +3,10 @@ package zap_test import ( "context" - middleware "github.com/grpc-ecosystem/go-grpc-middleware" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/logging" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags" - grpczap "github.com/grpc-ecosystem/go-grpc-middleware/providers/zap" + middleware "github.com/grpc-ecosystem/go-grpc-middleware/v2" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags" + grpczap "github.com/grpc-ecosystem/go-grpc-middleware/v2/providers/zap" "go.uber.org/zap" "google.golang.org/grpc" ) diff --git a/providers/zap/logger.go b/providers/zap/logger.go index 34bf58120..e9a055573 100644 --- a/providers/zap/logger.go +++ b/providers/zap/logger.go @@ -3,7 +3,7 @@ package zap import ( "fmt" - "github.com/grpc-ecosystem/go-grpc-middleware/interceptors/logging" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging" "go.uber.org/zap" ) diff --git a/util/backoffutils/backoff_test.go b/util/backoffutils/backoff_test.go index d58e2a882..c66dce9de 100644 --- a/util/backoffutils/backoff_test.go +++ b/util/backoffutils/backoff_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/grpc-ecosystem/go-grpc-middleware/util/backoffutils" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/util/backoffutils" "github.com/stretchr/testify/assert" ) diff --git a/util/metautils/nicemd_test.go b/util/metautils/nicemd_test.go index f15760e82..15c5ab2bf 100644 --- a/util/metautils/nicemd_test.go +++ b/util/metautils/nicemd_test.go @@ -7,7 +7,7 @@ import ( "context" "testing" - "github.com/grpc-ecosystem/go-grpc-middleware/util/metautils" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/util/metautils" "github.com/stretchr/testify/assert" "google.golang.org/grpc/metadata" )