MCPcopy
hub / github.com/grpc-ecosystem/grpc-gateway / newResponse

Method newResponse

internal/descriptor/services.go:294–305  ·  view source on GitHub ↗
(meth *Method, path string)

Source from the content-addressed store, hash-verified

292}
293
294func (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.

Callers 1

newMethodMethod · 0.95

Calls 2

resolveFieldPathMethod · 0.95
FieldPathTypeAlias · 0.85

Tested by

no test coverage detected