empty filenames don't have a suffix

so elide that condition. Even the small speed win is marginal,
since we just called exec before, which is way more expensive.
This commit is contained in:
Ingo Oeser 2015-08-22 22:59:27 +02:00
parent d06d40e71a
commit 8b627dab53

View File

@ -48,7 +48,7 @@ func GetChangedGoFiles() (result []string) {
resultLines := strings.Split(gitDiff, "\n")
for _, filename := range resultLines {
if filename != "" && strings.HasSuffix(filename, ".go") {
if strings.HasSuffix(filename, ".go") {
result = append(result, absolutePath+"/"+filename)
}
}