Fix go lint errors

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-10-25 15:26:44 -04:00
parent 8509569329
commit b6e0c4f321
16 changed files with 79 additions and 63 deletions

View File

@@ -58,9 +58,13 @@ const (
// Registration contains information for registering a plugin
type Registration struct {
Type Type
ID string
Config interface{}
// Type of the plugin
Type Type
// ID of the plugin
ID string
// Config specific to the plugin
Config interface{}
// Requires is a list of plugins that the registered plugin requires to be avaliable
Requires []Type
// InitFn is called when initializing a plugin. The registration and
@@ -69,6 +73,7 @@ type Registration struct {
InitFn func(*InitContext) (interface{}, error)
}
// Init the registered plugin
func (r *Registration) Init(ic *InitContext) *Plugin {
p, err := r.InitFn(ic)
return &Plugin{