code: func (s *Stream) Decode(val interface{}) error {
  	if val == nil {
  		return errDecodeIntoNil
  	}
  	rval := reflect.ValueOf(val)
  	rtyp := rval.Type()
  	if rtyp.Kind() != reflect.Ptr {
  		return errNoPointer
  	}
  	if rval.IsNil() {
  		return errDecodeIntoNil
  	}
  	info, err := cachedTypeInfo(rtyp.Elem(), tags{})
  	if err != nil {
  		return err
  	}
  
  	err = info.decoder(s, rval.Elem())
  	if decErr, ok := err.(*decodeError); ok && len(decErr.ctx) > 0 {
  		// add decode target type to error so context has more meaning
  		decErr.ctx = append(decErr.ctx, fmt.Sprint("(", rtyp.Elem(), ")"))
  	}
  	return err
  }
docs: // Decode decodes a value and stores the result in the value pointed
  // to by val. Please see the documentation for the Decode function
  // to learn about the decoding rules.