chore: fix golangci-lint errors

This commit is contained in:
Oleg Lobanov committed 2024-04-01 18:24:06 +02:00
1 parent d194d71293
commit ae0af1f996
54 files changed
+452 -475

No files matched your search

+5 -3
View File
@@ -1,15 +1,17 @@
package bolt
import (
"errors"
"github.com/asdine/storm/v3"
"github.com/filebrowser/filebrowser/v2/errors"
fbErrors "github.com/filebrowser/filebrowser/v2/errors"
)
func get(db *storm.DB, name string, to interface{}) error {
err := db.Get("config", name, to)
if err == storm.ErrNotFound {
return errors.ErrNotExist
if errors.Is(err, storm.ErrNotFound) {
return fbErrors.ErrNotExist
}
return err