refactor: add more go linters (#970)

This commit is contained in:
Oleg Lobanov
2020-06-01 01:12:36 +02:00
committed by GitHub
parent 54d92a2708
commit 700f32718e
56 changed files with 436 additions and 221 deletions

View File

@@ -4,11 +4,11 @@ import (
"path/filepath"
"regexp"
"github.com/filebrowser/filebrowser/v2/errors"
"github.com/spf13/afero"
"github.com/filebrowser/filebrowser/v2/errors"
"github.com/filebrowser/filebrowser/v2/files"
"github.com/filebrowser/filebrowser/v2/rules"
"github.com/spf13/afero"
)
// ViewMode describes a view mode.
@@ -52,6 +52,7 @@ var checkableFields = []string{
// Clean cleans up a user and verifies if all its fields
// are alright to be saved.
//nolint:gocyclo
func (u *User) Clean(baseScope string, fields ...string) error {
if len(fields) == 0 {
fields = checkableFields