chore: update golangci-lint config

This commit is contained in:
Steven
2023-09-17 22:55:13 +08:00
parent 9eb077c4af
commit cd0ea6558d
72 changed files with 272 additions and 187 deletions

View File

@@ -7,7 +7,9 @@ import (
"runtime"
"strings"
"github.com/pkg/errors"
"github.com/spf13/viper"
"github.com/usememos/memos/server/version"
)
@@ -46,7 +48,7 @@ func checkDSN(dataDir string) (string, error) {
dataDir = strings.TrimRight(dataDir, "\\/")
if _, err := os.Stat(dataDir); err != nil {
return "", fmt.Errorf("unable to access data folder %s, err %w", dataDir, err)
return "", errors.Wrapf(err, "unable to access data folder %s", dataDir)
}
return dataDir, nil