MCPcopy Create free account
hub / github.com/vmihailenco/msgpack / decodeNilValue

Method decodeNilValue

decode.go:346–356  ·  view source on GitHub ↗
(v reflect.Value)

Source from the content-addressed store, hash-verified

344}
345
346func (d *Decoder) decodeNilValue(v reflect.Value) error {
347 err := d.DecodeNil()
348 if v.IsNil() {
349 return err
350 }
351 if v.Kind() == reflect.Ptr {
352 v = v.Elem()
353 }
354 v.Set(reflect.Zero(v.Type()))
355 return err
356}
357
358func (d *Decoder) DecodeBool() (bool, error) {
359 c, err := d.readCode()

Callers 1

nilAwareDecoderFunction · 0.80

Calls 2

DecodeNilMethod · 0.95
SetMethod · 0.80

Tested by

no test coverage detected