Chore: Remove Wrap (#50048)

* Chore: Remove Wrap and Wrapf

* Fix: Add error check
This commit is contained in:
Kat Yang
2022-06-03 09:24:24 +02:00
committed by GitHub
parent 53cb94a2ad
commit 3c3039f5b3
34 changed files with 104 additions and 117 deletions
+2 -2
View File
@@ -1,11 +1,11 @@
package utils
import (
"fmt"
"os"
"path/filepath"
"github.com/grafana/grafana/pkg/cmd/grafana-cli/logger"
"github.com/grafana/grafana/pkg/util/errutil"
)
func GetGrafanaPluginDir(currentOS string) string {
@@ -22,7 +22,7 @@ func GetGrafanaPluginDir(currentOS string) string {
func getGrafanaRoot() (string, error) {
ex, err := os.Executable()
if err != nil {
return "", errutil.Wrap("failed to get executable path", err)
return "", fmt.Errorf("%v: %w", "failed to get executable path", err)
}
exPath := filepath.Dir(ex)
_, last := filepath.Split(exPath)