// DecodeFooRequest is a transport/http.DecodeRequestFunc that decodes a
// JSON-encoded sum request from the HTTP request body. Primarily useful in a server.
func DecodeFooRequest(_ context.Context, r *http.Request) (req interface{}, err error) {
req = endpoints.FooRequest{}
err = json.NewDecoder(r.Body).Decode(&r)
return req, err
}
// DecodeFooRequest is a transport/http.DecodeRequestFunc that decodes a // JSON-encoded sum request from the HTTP request body. Primarily useful in a server. func DecodeFooRequest(_ context.Context, r *http.Request) (req interface{}, err error) { req = endpoints.FooRequest{} err = json.NewDecoder(r.Body).Decode(&r) return req, err }
the '&r' should be '&req'?