Chore: Drop xerrors dependency (#26718)

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Arve Knudsen
2020-07-31 09:45:20 +02:00
committed by GitHub
parent 5a6afd9096
commit 16c185c3b9
20 changed files with 79 additions and 61 deletions

View File

@ -21,7 +21,6 @@ import (
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/util"
"github.com/grafana/grafana/pkg/util/errutil"
"golang.org/x/xerrors"
)
var (
@ -193,11 +192,11 @@ func (pm *PluginManager) scan(pluginDir string, requireSigned bool) error {
}
if err := util.Walk(pluginDir, true, true, scanner.walker); err != nil {
if xerrors.Is(err, os.ErrNotExist) {
if errors.Is(err, os.ErrNotExist) {
pm.log.Debug("Couldn't scan directory since it doesn't exist", "pluginDir", pluginDir)
return nil
}
if xerrors.Is(err, os.ErrPermission) {
if errors.Is(err, os.ErrPermission) {
pm.log.Debug("Couldn't scan directory due to lack of permissions", "pluginDir", pluginDir)
return nil
}