code: func (d *Decoder) decodeInterface(v reflect.Value) (int, error) {
  	if v.IsNil() || !v.CanInterface() {
  		msg := fmt.Sprintf("can't decode to nil interface")
  		err := unmarshalError("decodeInterface", ErrNilInterface, msg,
  			nil, nil)
  		return 0, err
  	}
  
  	// Extract underlying value from the interface and indirect through
  	// pointers allocating them as needed.
  	ve := reflect.ValueOf(v.Interface())
  	ve, err := d.indirect(ve)
  	if err != nil {
  		return 0, err
  	}
  	if !ve.CanSet() {
  		msg := fmt.Sprintf("can't decode to unsettable '%v'",
  			ve.Type().String())
  		err := unmarshalError("decodeInterface", ErrNotSettable, msg,
  			nil, nil)
  		return 0, err
  	}
  	return d.decode(ve)
  }
docs: // decodeInterface examines the interface represented by the passed reflection
  // value to detect whether it is an interface that can be decoded into and
  // if it is, extracts the underlying value to pass back into the decode function
  // for decoding according to its type.  It returns the  the number of bytes
  // actually read.
  //
  // An UnmarshalError is returned if any issues are encountered while decoding
  // the interface.