chore: update golangci-lint config

This commit is contained in:
steven
2023-09-22 17:55:26 +08:00
committed by Steven
parent a58ebd27ca
commit 07e0bb2d4c
42 changed files with 195 additions and 137 deletions

View File

@ -7,8 +7,10 @@ import (
"runtime"
"strings"
"github.com/boojack/slash/server/version"
"github.com/pkg/errors"
"github.com/spf13/viper"
"github.com/boojack/slash/server/version"
)
// Profile is the configuration to start main server.
@ -44,7 +46,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