fix golint
This commit is contained in:
parent
e669f3b3f4
commit
c36860ce65
@ -5,8 +5,8 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/filebrowser/filebrowser/v2/files"
|
|
||||||
libErrors "github.com/filebrowser/filebrowser/v2/errors"
|
libErrors "github.com/filebrowser/filebrowser/v2/errors"
|
||||||
|
"github.com/filebrowser/filebrowser/v2/files"
|
||||||
)
|
)
|
||||||
|
|
||||||
var withHashFile = func(fn handleFunc) handleFunc {
|
var withHashFile = func(fn handleFunc) handleFunc {
|
||||||
@ -53,7 +53,7 @@ func ifPathWithName(r *http.Request) (id, rootName, path string) {
|
|||||||
switch len(pathElements) {
|
switch len(pathElements) {
|
||||||
case 1:
|
case 1:
|
||||||
return r.URL.Path, "", ""
|
return r.URL.Path, "", ""
|
||||||
case 2:
|
case 2: //nolint: mnd
|
||||||
return pathElements[0], pathElements[1], ""
|
return pathElements[0], pathElements[1], ""
|
||||||
default:
|
default:
|
||||||
return pathElements[0], pathElements[1], strings.Join(pathElements[2:], "/")
|
return pathElements[0], pathElements[1], strings.Join(pathElements[2:], "/")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user