code: func ReadAttributes(r io.Reader, domain []string, allowMacro bool) (attributes []MatchAttribute, err error) {
  	data, err := ioutil.ReadAll(r)
  	if err != nil {
  		return nil, err
  	}
  
  	for _, line := range strings.Split(string(data), eol) {
  		attribute, err := ParseAttributesLine(line, domain, allowMacro)
  		if err != nil {
  			return attributes, err
  		}
  		if len(attribute.Name) == 0 {
  			continue
  		}
  
  		attributes = append(attributes, attribute)
  	}
  
  	return attributes, nil
  }
docs: // ReadAttributes reads patterns and attributes from the gitattributes format.