mirror of https://github.com/gin-gonic/gin.git
Update files according go fmt
This commit is contained in:
parent
4f3ceafa84
commit
ee02565f7c
8
gin.go
8
gin.go
|
@ -9,10 +9,10 @@ import (
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"sync"
|
|
||||||
"strings"
|
|
||||||
"sort"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"sort"
|
||||||
|
"strings"
|
||||||
|
"sync"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin/render"
|
"github.com/gin-gonic/gin/render"
|
||||||
)
|
)
|
||||||
|
@ -208,7 +208,7 @@ func (engine *Engine) LoadHTMLFilesRecursively(folder string, extensionsAllowed
|
||||||
extension := strings.ToLower(filepath.Ext(path))
|
extension := strings.ToLower(filepath.Ext(path))
|
||||||
indexFound := sort.SearchStrings(extensionsAllowed, extension)
|
indexFound := sort.SearchStrings(extensionsAllowed, extension)
|
||||||
if indexFound < len(extensionsAllowed) && extensionsAllowed[indexFound] == extension {
|
if indexFound < len(extensionsAllowed) && extensionsAllowed[indexFound] == extension {
|
||||||
files = append(files, path);
|
files = append(files, path)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -277,7 +277,6 @@ func TestLoadHTMLFilesFuncMap(t *testing.T) {
|
||||||
td()
|
td()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func TestLoadHTMLFilesRecursively(t *testing.T) {
|
func TestLoadHTMLFilesRecursively(t *testing.T) {
|
||||||
td := setupHTMLFilesRecursively(t, DebugMode, false)
|
td := setupHTMLFilesRecursively(t, DebugMode, false)
|
||||||
res, err := http.Get("http://127.0.0.1:8888/test")
|
res, err := http.Get("http://127.0.0.1:8888/test")
|
||||||
|
|
Loading…
Reference in New Issue