1
0
mirror of https://github.com/go-kratos/kratos.git synced 2026-05-22 10:15:24 +02:00

cmd/protoc-gen-go-http: fix http protoc to bind query_string (#1126)

* fix http protoc to bind query_string

Co-authored-by: longXboy <longxboyhi@gmail.com>
This commit is contained in:
Tony Chen
2021-06-30 14:13:28 +08:00
committed by GitHub
parent 0cdeb6c16b
commit d4d6925cd0
11 changed files with 65 additions and 43 deletions
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-http. DO NOT EDIT.
// versions:
// protoc-gen-go-http v2.0.0-rc5
// protoc-gen-go-http v2.0.0-rc7
package helloworld
@@ -29,7 +29,7 @@ func RegisterGreeterHTTPServer(s *http.Server, srv GreeterHTTPServer) {
func _Greeter_SayHello0_HTTP_Handler(srv GreeterHTTPServer) func(ctx http.Context) error {
return func(ctx http.Context) error {
var in HelloRequest
if err := ctx.Bind(&in); err != nil {
if err := ctx.BindQuery(&in); err != nil {
return err
}
if err := ctx.BindVars(&in); err != nil {