mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Plugins: Optimize creation of Golang errors and slices (#69448)
* tidy up * fix tests
This commit is contained in:
@@ -2,7 +2,7 @@ package loader
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"errors"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"testing"
|
||||
@@ -1048,7 +1048,7 @@ func TestLoader_Load_SkipUninitializedPlugins(t *testing.T) {
|
||||
procPrvdr.BackendFactoryFunc = func(ctx context.Context, p *plugins.Plugin) backendplugin.PluginFactoryFunc {
|
||||
return func(pluginID string, _ log.Logger, _ []string) (backendplugin.Plugin, error) {
|
||||
if pluginID == "test-datasource" {
|
||||
return nil, fmt.Errorf("failed to initialize")
|
||||
return nil, errors.New("failed to initialize")
|
||||
}
|
||||
return &fakes.FakePluginClient{}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user