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
+2 -2
View File
@@ -6,7 +6,7 @@ import (
"path/filepath"
"github.com/grafana/grafana/pkg/cmd/grafana-cli/logger"
"golang.org/x/xerrors"
"github.com/grafana/grafana/pkg/util/errutil"
)
func GetGrafanaPluginDir(currentOS string) string {
@@ -23,7 +23,7 @@ func GetGrafanaPluginDir(currentOS string) string {
func getGrafanaRoot() (string, error) {
ex, err := os.Executable()
if err != nil {
return "", xerrors.New("Failed to get executable path")
return "", errutil.Wrap("failed to get executable path", err)
}
exPath := filepath.Dir(ex)
_, last := path.Split(exPath)