(meth *Method, path string)
| 292 | } |
| 293 | |
| 294 | func (r *Registry) newResponse(meth *Method, path string) (*Body, error) { |
| 295 | msg := meth.ResponseType |
| 296 | switch path { |
| 297 | case "", "*": |
| 298 | return nil, nil |
| 299 | } |
| 300 | fields, err := r.resolveFieldPath(msg, path, false) |
| 301 | if err != nil { |
| 302 | return nil, err |
| 303 | } |
| 304 | return &Body{FieldPath: FieldPath(fields)}, nil |
| 305 | } |
| 306 | |
| 307 | // lookupField looks up a field named "name" within "msg". |
| 308 | // It returns nil if no such field found. |
no test coverage detected