Browse Source

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>
Sebastiaan van Stijn 2 years ago
parent
commit
5bd44cf3c4
1 changed files with 1 additions and 5 deletions
  1. 1 5
      pkg/plugins/plugins.go

+ 1 - 5
pkg/plugins/plugins.go

@@ -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.