You've already forked filebrowser
mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-11-26 14:25:26 +08:00
build: bump golangci-lint to 2.1.6
This commit is contained in:
committed by
Henrique Dias
parent
da03728cd7
commit
1d494ff315
@@ -73,7 +73,7 @@ func dbExists(path string) (bool, error) {
|
||||
d := filepath.Dir(path)
|
||||
_, err = os.Stat(d)
|
||||
if os.IsNotExist(err) {
|
||||
if err := os.MkdirAll(d, 0700); err != nil { //nolint:govet,gomnd
|
||||
if err := os.MkdirAll(d, 0700); err != nil { //nolint:govet,mnd
|
||||
return false, err
|
||||
}
|
||||
return false, nil
|
||||
@@ -121,7 +121,7 @@ func marshal(filename string, data interface{}) error {
|
||||
defer fd.Close()
|
||||
|
||||
switch ext := filepath.Ext(filename); ext {
|
||||
case ".json":
|
||||
case ".json": //nolint:goconst
|
||||
encoder := json.NewEncoder(fd)
|
||||
encoder.SetIndent("", " ")
|
||||
return encoder.Encode(data)
|
||||
|
||||
Reference in New Issue
Block a user