Skip to content

Commit

Permalink
rebase: grpc_middleware.WithUnaryServerChain is deprecated
Browse files Browse the repository at this point in the history
golangci-lint reports that `grpc_middleware.WithUnaryServerChain` is
deprecated and `google.golang.org/grpc.ChainUnaryInterceptor` should be
used instead.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
  • Loading branch information
nixpanic authored and mergify[bot] committed May 10, 2023
1 parent 257ce59 commit 3d48978
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/csi-common/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func NewMiddlewareServerOption(withMetrics bool) grpc.ServerOption {
middleWare = append(middleWare, grpc_prometheus.UnaryServerInterceptor)
}

return grpc_middleware.WithUnaryServerChain(middleWare...)
return grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer(middleWare...))
}

func getReqID(req interface{}) string {
Expand Down

0 comments on commit 3d48978

Please sign in to comment.