Chore: Remove Wrapf (#50128)

* Chore: Remove Wrapf

* Remove all Wrapf refs

* Remove last Wrapf ref

* Fix lint errors

* Remove Wrap and Wrapf definitions

* Remove unnecessary colon
This commit is contained in:
Kat Yang
2022-06-06 22:30:31 +02:00
committed by GitHub
parent 56eb131715
commit 31630edf0c
27 changed files with 62 additions and 107 deletions
+2 -3
View File
@@ -24,7 +24,6 @@ import (
"time"
"github.com/grafana/grafana/pkg/plugins"
"github.com/grafana/grafana/pkg/util/errutil"
)
type Installer struct {
@@ -170,7 +169,7 @@ func (i *Installer) Install(ctx context.Context, pluginID, version, pluginsDir,
for _, dep := range res.Dependencies.Plugins {
i.log.Infof("Fetching %s dependencies...", res.ID)
if err := i.Install(ctx, dep.ID, normalizeVersion(dep.Version), pluginsDir, "", pluginRepoURL); err != nil {
return errutil.Wrapf(err, "failed to install plugin %s", dep.ID)
return fmt.Errorf("failed to install plugin %s: %w", dep.ID, err)
}
}
@@ -609,7 +608,7 @@ func extractSymlink(file *zip.File, filePath string) error {
return fmt.Errorf("%v: %w", "failed to copy symlink contents", err)
}
if err := os.Symlink(strings.TrimSpace(buf.String()), filePath); err != nil {
return errutil.Wrapf(err, "failed to make symbolic link for %v", filePath)
return fmt.Errorf("failed to make symbolic link for %v: %w", filePath, err)
}
return nil
}