go-kratos / kratos

Your ultimate Go microservices framework for the cloud-native era.
https://go-kratos.dev
MIT License
23.3k stars 4.01k forks source link

[Question] HelloRequest does not implement protoreflect.ProtoMessage (missing ProtoReflect method) #1272

Closed achilsh closed 3 years ago

achilsh commented 3 years ago
  1. env: use new version kratos,

  2. local env in dir: kratos/helloworld run cmd: go build -o ./bin/ ./...

  3. result: api/helloworld/v1/greeter_http.pb.go:66:27: cannot use in (type HelloRequest) as type protoreflect.ProtoMessage in argument to binding.EncodeURL: HelloRequest does not implement protoreflect.ProtoMessage (missing ProtoReflect method)

  4. any suggestion for above?

tonybase commented 3 years ago

需要升级一下 go install google.golang.org/protobuf/cmd/protoc-gen-go@latest

https://developers.google.com/protocol-buffers/docs/reference/go-generated

Tangruilin commented 2 years ago

我升级了之后运行还是会报这个错误 @tonybase