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

Function populateField

runtime/query.go:166–174  ·  view source on GitHub ↗
(fieldDescriptor protoreflect.FieldDescriptor, msgValue protoreflect.Message, value string)

Source from the content-addressed store, hash-verified

164}
165
166func populateField(fieldDescriptor protoreflect.FieldDescriptor, msgValue protoreflect.Message, value string) error {
167 v, err := parseField(fieldDescriptor, value)
168 if err != nil {
169 return fmt.Errorf("parsing field %q: %w", fieldDescriptor.FullName().Name(), err)
170 }
171
172 msgValue.Set(fieldDescriptor, v)
173 return nil
174}
175
176func populateRepeatedField(fieldDescriptor protoreflect.FieldDescriptor, list protoreflect.List, values []string) error {
177 for _, value := range values {

Callers 1

Calls 2

parseFieldFunction · 0.85
SetMethod · 0.80

Tested by

no test coverage detected