(fs billy.Filesystem, path []string, attributesFile string, allowMacro bool)
| 19 | ) |
| 20 | |
| 21 | func ReadAttributesFile(fs billy.Filesystem, path []string, attributesFile string, allowMacro bool) ([]MatchAttribute, error) { |
| 22 | f, err := fs.Open(fs.Join(append(path, attributesFile)...)) |
| 23 | if os.IsNotExist(err) { |
| 24 | return nil, nil |
| 25 | } |
| 26 | if err != nil { |
| 27 | return nil, err |
| 28 | } |
| 29 | |
| 30 | defer gioutil.CheckClose(f, &err) |
| 31 | |
| 32 | return ReadAttributes(f, path, allowMacro) |
| 33 | } |
| 34 | |
| 35 | // ReadPatterns reads gitattributes patterns recursively through the directory |
| 36 | // structure. The result is in ascending order of priority (last higher). |
no test coverage detected