pkg/plugins: remove "load()" function

It was used in a single place and was abstracting "loadWithRetry";
let's just inline it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-07-18 11:35:43 +02:00
parent 77c03221c9
commit 5bd44cf3c4
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -201,10 +201,6 @@ func (p *Plugin) implements(kind string) bool {
return false
}
func load(name string) (*Plugin, error) {
return loadWithRetry(name, true)
}
func loadWithRetry(name string, retry bool) (*Plugin, error) {
registry := NewLocalRegistry()
start := time.Now()
@ -254,7 +250,7 @@ func get(name string) (*Plugin, error) {
if ok {
return pl, pl.activate()
}
return load(name)
return loadWithRetry(name, true)
}
// Get returns the plugin given the specified name and requested implementation.