code: func ReadPatterns(fs billy.Filesystem, path []string) (attributes []MatchAttribute, err error) {
  	attributes, err = ReadAttributesFile(fs, path, gitattributesFile, true)
  	if err != nil {
  		return
  	}
  
  	attrs, err := walkDirectory(fs, path)
  	return append(attributes, attrs...), err
  }
docs: // ReadPatterns reads gitattributes patterns recursively through the directory
  // structure. The result is in ascending order of priority (last higher).
  //
  // The .gitattribute file in the root directory will allow custom macro
  // definitions. Custom macro definitions in other directories .gitattributes
  // will return an error.