Update files according go fmt

This commit is contained in:
math-nao 2018-03-23 01:17:51 +01:00
parent 4f3ceafa84
commit ee02565f7c
2 changed files with 4 additions and 5 deletions

8
gin.go
View File

@ -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

View File

@ -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")