cloudflare/pint
Publicmirrored from https://github.com/cloudflare/pintAvailable
internal/discovery/discovery.go
32lines · modecode
| 1 | package discovery |
| 2 | |
| 3 | type File struct { |
| 4 | Path string |
| 5 | Commits []string |
| 6 | } |
| 7 | |
| 8 | type FileFindResults interface { |
| 9 | Results() []File |
| 10 | Paths() []string |
| 11 | Commits() []string |
| 12 | HasCommit(commit string) bool |
| 13 | } |
| 14 | |
| 15 | type FileFinder interface { |
| 16 | Find(...string) (FileFindResults, error) |
| 17 | } |
| 18 | |
| 19 | type Line struct { |
| 20 | Path string |
| 21 | Position int |
| 22 | Commit string |
| 23 | } |
| 24 | |
| 25 | type LineFindResults interface { |
| 26 | Results() []Line |
| 27 | HasLines(lines []int) bool |
| 28 | } |
| 29 | |
| 30 | type LineFinder interface { |
| 31 | Find(string) (LineFindResults, error) |
| 32 | } |
| 33 | |