From d06d40e71a479ee1d7f0b1998fc7726739590376 Mon Sep 17 00:00:00 2001 From: Ingo Oeser Date: Sat, 22 Aug 2015 22:55:05 +0200 Subject: [PATCH] you actully CAN range over nil slices in Go as Go will just handle it like an empty slice. --- general/gochanges.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/general/gochanges.go b/general/gochanges.go index d3e4f3d..02c365b 100644 --- a/general/gochanges.go +++ b/general/gochanges.go @@ -47,9 +47,6 @@ func GetChangedGoFiles() (result []string) { absolutePath := GetGitRoot() resultLines := strings.Split(gitDiff, "\n") - if resultLines == nil { - return - } for _, filename := range resultLines { if filename != "" && strings.HasSuffix(filename, ".go") { result = append(result, absolutePath+"/"+filename)