code: func decodeAttr(attr *internal.Attr) (key string, value interface{}) {
  	switch attr.Type {
  	case attrTypeString:
  		return attr.Key, attr.StringValue
  	case attrTypeInt:
  		return attr.Key, attr.IntValue
  	case attrTypeBool:
  		return attr.Key, attr.BoolValue
  	case attrTypeFloat:
  		return attr.Key, attr.FloatValue
  	default:
  		return attr.Key, nil
  	}
  }
docs: // decodeAttr converts from an Attr internal representation to a key/value pair.