MCPcopy Index your code
hub / github.com/vmihailenco/msgpack / interfaceValue

Method interfaceValue

decode_value.go:188–206  ·  view source on GitHub ↗
(v reflect.Value)

Source from the content-addressed store, hash-verified

186}
187
188func (d *Decoder) interfaceValue(v reflect.Value) error {
189 vv, err := d.decodeInterfaceCond()
190 if err != nil {
191 return err
192 }
193
194 if vv != nil {
195 if v.Type() == errorType {
196 if vv, ok := vv.(string); ok {
197 v.Set(reflect.ValueOf(errors.New(vv)))
198 return nil
199 }
200 }
201
202 v.Set(reflect.ValueOf(vv))
203 }
204
205 return nil
206}
207
208func decodeUnsupportedValue(d *Decoder, v reflect.Value) error {
209 return fmt.Errorf("msgpack: Decode(unsupported %s)", v.Type())

Callers 1

decodeInterfaceValueFunction · 0.80

Calls 2

decodeInterfaceCondMethod · 0.95
SetMethod · 0.80

Tested by

no test coverage detected