mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-01-23 02:35:10 +00:00
build: bump golangci-lint to 2.1.6
This commit is contained in:
parent
da03728cd7
commit
1d494ff315
15 changed files with 515 additions and 436 deletions
|
|
@ -44,7 +44,6 @@ func parseQueryFiles(r *http.Request, f *files.FileInfo, _ *users.User) ([]strin
|
|||
return fileSlice, nil
|
||||
}
|
||||
|
||||
//nolint:goconst
|
||||
func parseQueryAlgorithm(r *http.Request) (string, archiver.Writer, error) {
|
||||
switch r.URL.Query().Get("algo") {
|
||||
case "zip", "true", "":
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ var sharePostHandler = withPermShare(func(w http.ResponseWriter, r *http.Request
|
|||
defer r.Body.Close()
|
||||
}
|
||||
|
||||
bytes := make([]byte, 6) //nolint:gomnd
|
||||
bytes := make([]byte, 6) //nolint:mnd
|
||||
_, err := rand.Read(bytes)
|
||||
if err != nil {
|
||||
return http.StatusInternalServerError, err
|
||||
|
|
@ -130,7 +130,7 @@ var sharePostHandler = withPermShare(func(w http.ResponseWriter, r *http.Request
|
|||
|
||||
var token string
|
||||
if len(hash) > 0 {
|
||||
tokenBuffer := make([]byte, 96) //nolint:gomnd
|
||||
tokenBuffer := make([]byte, 96) //nolint:mnd
|
||||
if _, err := rand.Read(tokenBuffer); err != nil {
|
||||
return http.StatusInternalServerError, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ func tusPostHandler() handleFunc {
|
|||
}
|
||||
|
||||
fileFlags := os.O_CREATE | os.O_WRONLY
|
||||
if r.URL.Query().Get("override") == "true" {
|
||||
if r.URL.Query().Get("override") == "true" { //nolint:goconst
|
||||
fileFlags |= os.O_TRUNC
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue