(path string)
| 15 | } |
| 16 | |
| 17 | func NewMatchFile(path string) MatchFile { |
| 18 | _, filename := filepath.Split(path) |
| 19 | extension := filepath.Ext(path) |
| 20 | contents, _ := ioutil.ReadFile(path) |
| 21 | |
| 22 | return MatchFile{ |
| 23 | Path: path, |
| 24 | Filename: filename, |
| 25 | Extension: extension, |
| 26 | Contents: contents, |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | func IsSkippableFile(path string) bool { |
| 31 | extension := strings.ToLower(filepath.Ext(path)) |