Skip to content

Commit

Permalink
refine code
Browse files Browse the repository at this point in the history
  • Loading branch information
chai2010 committed Jul 17, 2018
1 parent 86aa268 commit b31be7a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions examples/hello.pb/hello.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
2 changes: 1 addition & 1 deletion protoc-gen-pbgo/pbgo.go
Expand Up @@ -275,7 +275,7 @@ func {{.ServiceName}}Handler(svc {{.ServiceName}}Interface) http.Handler {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
err := pbgo.PopulateFieldFromPath(&protoReq, "{{$rest.RequestBody}}", rBody)
err := pbgo.PopulateFieldFromPath(&protoReq, "{{$rest.RequestBody}}", string(rBody))
if err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return
Expand Down

0 comments on commit b31be7a

Please sign in to comment.