build(backend): upgrade golangci-lint to 1.46.2 (#1991)

This commit is contained in:
Oleg Lobanov
2022-06-13 16:13:10 +02:00
committed by GitHub
parent 577c0efa9c
commit 8118afd0ac
4 changed files with 272 additions and 141 deletions

View File

@@ -6,9 +6,10 @@ import (
"net/http"
"sort"
"strconv"
"strings"
"github.com/gorilla/mux"
"golang.org/x/text/cases"
"golang.org/x/text/language"
"github.com/filebrowser/filebrowser/v2/errors"
"github.com/filebrowser/filebrowser/v2/users"
@@ -176,7 +177,7 @@ var userPutHandler = withSelfOrAdmin(func(w http.ResponseWriter, r *http.Request
}
for k, v := range req.Which {
v = strings.Title(v)
v = cases.Title(language.English).String(v)
req.Which[k] = v
if v == "Password" {