diff --git a/Makefile b/Makefile index 13148fa2e..f43c47a45 100644 --- a/Makefile +++ b/Makefile @@ -107,7 +107,7 @@ lint: $(BUF) $(COPYRIGHT) fmt docs lint_module: ## Runs various static analysis against our code. lint_module: $(FAILLINT) $(GOLANGCI_LINT) $(MISSPELL) @echo ">> verifying modules being imported" - @cd $(DIR) && $(FAILLINT) -paths "errors=github.com/pkg/errors,fmt.{Print,Printf,Println},github.com/golang/protobuf=google.golang.org/protobuf" ./... + @cd $(DIR) && $(FAILLINT) -paths "fmt.{Print,Printf,Println},github.com/golang/protobuf=google.golang.org/protobuf" ./... @echo ">> examining all of the Go files" @cd $(DIR) && go vet -stdmethods=false ./... diff --git a/go.mod b/go.mod index 56d19d397..c6e1d716f 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module github.com/grpc-ecosystem/go-grpc-middleware/v2 go 1.19 require ( - github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.7.0 golang.org/x/net v0.8.0 golang.org/x/oauth2 v0.4.0 diff --git a/go.sum b/go.sum index aea2ed306..c51577108 100644 --- a/go.sum +++ b/go.sum @@ -10,8 +10,6 @@ github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/interceptors/logging/interceptors_test.go b/interceptors/logging/interceptors_test.go index ed6087b35..158391145 100644 --- a/interceptors/logging/interceptors_test.go +++ b/interceptors/logging/interceptors_test.go @@ -19,7 +19,6 @@ import ( "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/testing/testpb" - "github.com/pkg/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" @@ -563,7 +562,7 @@ func (s *loggingPayloadSuite) TestPingStream_LogsAllRequestsAndResponses() { if got >= 4*messagesExpected { return nil } - return errors.Errorf("not enough log lines, waiting; got: %v", got) + return fmt.Errorf("not enough log lines, waiting; got: %v", got) })) s.assertPayloadLogLinesForMessage(s.logger.o.Lines(), "PingStream", interceptors.BidiStream) } diff --git a/interceptors/ratelimit/ratelimit_test.go b/interceptors/ratelimit/ratelimit_test.go index 6643e8b33..c4d232e0f 100644 --- a/interceptors/ratelimit/ratelimit_test.go +++ b/interceptors/ratelimit/ratelimit_test.go @@ -5,9 +5,9 @@ package ratelimit import ( "context" + "errors" "testing" - "github.com/pkg/errors" "github.com/stretchr/testify/assert" "google.golang.org/grpc" "google.golang.org/grpc/codes" diff --git a/interceptors/selector/selector_test.go b/interceptors/selector/selector_test.go index 942bdbf42..1fe229a81 100644 --- a/interceptors/selector/selector_test.go +++ b/interceptors/selector/selector_test.go @@ -5,10 +5,10 @@ package selector import ( "context" + "errors" "testing" "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors" - "github.com/pkg/errors" "github.com/stretchr/testify/assert" "google.golang.org/grpc" ) diff --git a/testing/testpb/test.manual_validator.pb.go b/testing/testpb/test.manual_validator.pb.go index 6f7acf0fb..b1e64ee5c 100644 --- a/testing/testpb/test.manual_validator.pb.go +++ b/testing/testpb/test.manual_validator.pb.go @@ -3,9 +3,8 @@ package testpb import ( + "errors" "math" - - "github.com/pkg/errors" ) func (x *PingRequest) Validate(bool) error {