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:
parent
77c03221c9
commit
5bd44cf3c4
1 changed files with 1 additions and 5 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue