grpc gateway 服务编译不通过

来源:3-4 GRPC Gateway的实现

精兵

2021-08-15 02:06:43

grpc  gateway 服务编译不通过


http://img.mukewang.com/climg/611805aa0905d96c13780539.jpg


运行的时候报错:

# command-line-arguments

.\main.go:36:54: cannot use mux (type *"github.com/grpc-ecosystem/grpc-gateway/runtime".ServeMux) as type *"github.com/grpc-ecosystem/grpc-gateway/v2/runtime".ServeMux in argument to trippb.RegisterTripServiceHandlerFromEndpoint



写回答

1回答

精兵

提问者

2021-08-15

解决了 是我导入的包错了😓​   应该导入v2的 runtime


github.com/grpc-ecosystem/grpc-gateway/v2/runtime


0

0 学习 · 1399 问题

查看课程