grpc gateway 服务编译不通过
来源:3-4 GRPC Gateway的实现
精兵
2021-08-15 02:06:43
grpc gateway 服务编译不通过
运行的时候报错:
# 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
相似问题
回答 1