Merge pull request #60 from hasAdamr/http_transport_hotfix
Fix http transport panic
This commit is contained in:
Коммит
0f3568ddf5
|
@ -52,7 +52,7 @@ var ClientEncodeTemplate = `
|
|||
// the http request (path, query, and body).
|
||||
func EncodeHTTP{{$binding.Label}}Request(_ context.Context, r *http.Request, request interface{}) error {
|
||||
fmt.Printf("Encoding request %v\n", request)
|
||||
req := request.(pb.{{GoName $binding.Parent.RequestType}})
|
||||
req := request.(*pb.{{GoName $binding.Parent.RequestType}})
|
||||
_ = req
|
||||
|
||||
// Set the path parameters
|
||||
|
|
|
@ -60,7 +60,7 @@ func TestGenClientEncode(t *testing.T) {
|
|||
// the http request (path, query, and body).
|
||||
func EncodeHTTPSumZeroRequest(_ context.Context, r *http.Request, request interface{}) error {
|
||||
fmt.Printf("Encoding request %v\n", request)
|
||||
req := request.(pb.SumRequest)
|
||||
req := request.(*pb.SumRequest)
|
||||
_ = req
|
||||
|
||||
// Set the path parameters
|
||||
|
|
Загрузка…
Ссылка в новой задаче