Plugins: Remove unnecessary error result from env vars interface (#73224)
* remove error from interface * fix test
This commit is contained in:
@@ -16,7 +16,7 @@ import (
|
||||
)
|
||||
|
||||
type Provider interface {
|
||||
Get(ctx context.Context, p *plugins.Plugin) ([]string, error)
|
||||
Get(ctx context.Context, p *plugins.Plugin) []string
|
||||
}
|
||||
|
||||
type Service struct {
|
||||
@@ -31,7 +31,7 @@ func NewProvider(cfg *config.Cfg, license plugins.Licensing) *Service {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Service) Get(ctx context.Context, p *plugins.Plugin) ([]string, error) {
|
||||
func (s *Service) Get(_ context.Context, p *plugins.Plugin) []string {
|
||||
hostEnv := []string{
|
||||
fmt.Sprintf("GF_VERSION=%s", s.cfg.BuildVersion),
|
||||
}
|
||||
@@ -62,7 +62,7 @@ func (s *Service) Get(ctx context.Context, p *plugins.Plugin) ([]string, error)
|
||||
hostEnv = append(hostEnv, s.tracingEnvVars(p)...)
|
||||
|
||||
ev := getPluginSettings(p.ID, s.cfg).asEnvVar("GF_PLUGIN", hostEnv)
|
||||
return ev, nil
|
||||
return ev
|
||||
}
|
||||
|
||||
func (s *Service) tracingEnvVars(plugin *plugins.Plugin) []string {
|
||||
|
||||
Reference in New Issue
Block a user