Chore: Enable errorlint linter (#29227)

* Enable errorlint linter
* Handle wrapped errors

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
This commit is contained in:
Arve Knudsen
2020-11-19 14:47:17 +01:00
committed by GitHub
parent 993adb72e0
commit 9593d57914
34 changed files with 142 additions and 101 deletions

View File

@ -1,6 +1,8 @@
package plugins
import (
"errors"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/models"
@ -42,7 +44,7 @@ func (ap *PluginProvisioner) apply(cfg *pluginsAsConfig) error {
query := &models.GetPluginSettingByIdQuery{OrgId: app.OrgID, PluginId: app.PluginID}
err := bus.Dispatch(query)
if err != nil {
if err != models.ErrPluginSettingNotFound {
if !errors.Is(err, models.ErrPluginSettingNotFound) {
return err
}
} else {