diff --git a/gin.go b/gin.go index f4ecdb9c..00d610e2 100644 --- a/gin.go +++ b/gin.go @@ -9,10 +9,10 @@ import ( "net" "net/http" "os" - "sync" - "strings" - "sort" "path/filepath" + "sort" + "strings" + "sync" "github.com/gin-gonic/gin/render" ) @@ -208,7 +208,7 @@ func (engine *Engine) LoadHTMLFilesRecursively(folder string, extensionsAllowed extension := strings.ToLower(filepath.Ext(path)) indexFound := sort.SearchStrings(extensionsAllowed, extension) if indexFound < len(extensionsAllowed) && extensionsAllowed[indexFound] == extension { - files = append(files, path); + files = append(files, path) } return nil diff --git a/gin_test.go b/gin_test.go index 1132aa03..2acfbd9c 100644 --- a/gin_test.go +++ b/gin_test.go @@ -277,7 +277,6 @@ func TestLoadHTMLFilesFuncMap(t *testing.T) { td() } - func TestLoadHTMLFilesRecursively(t *testing.T) { td := setupHTMLFilesRecursively(t, DebugMode, false) res, err := http.Get("http://127.0.0.1:8888/test")