code: func (d *Decoder) decodeBasic(name string, data interface{}, val reflect.Value) error {
  	if val.IsValid() && val.Elem().IsValid() {
  		return d.decode(name, data, val.Elem())
  	}
  
  	dataVal := reflect.ValueOf(data)
  
  	// If the input data is a pointer, and the assigned type is the dereference
  	// of that exact pointer, then indirect it so that we can assign it.
  	// Example: *string to string
  	if dataVal.Kind() == reflect.Ptr && dataVal.Type().Elem() == val.Type() {
  		dataVal = reflect.Indirect(dataVal)
  	}
  
  	if !dataVal.IsValid() {
  		dataVal = reflect.Zero(val.Type())
  	}
  
  	dataValType := dataVal.Type()
  	if !dataValType.AssignableTo(val.Type()) {
  		return fmt.Errorf(
  			"'%s' expected type '%s', got '%s'",
  			name, val.Type(), dataValType)
  	}
  
  	val.Set(dataVal)
  	return nil
  }
docs: // This decodes a basic type (bool, int, string, etc.) and sets the
  // value to "data" of that type.