Browse Source

Fix plugin template

Signed-off-by: Robert Lin <robertlin1@gmail.com>
Robert Lin 6 years ago
parent
commit
e0615080b1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      cmd/hercules/plugin.template

+ 1 - 1
cmd/hercules/plugin.template

@@ -92,7 +92,7 @@ func ({{.varname}} *{{.name}}) Configure(facts map[string]interface{}) error {
 // Initialize resets the internal temporary data structures and prepares the object for Consume().
 // Initialize resets the internal temporary data structures and prepares the object for Consume().
 func ({{.varname}} *{{.name}}) Initialize(repository *git.Repository) error {
 func ({{.varname}} *{{.name}}) Initialize(repository *git.Repository) error {
   if {{.varname}}.l == nil {
   if {{.varname}}.l == nil {
-    l = hercules.NewLogger()
+    {{.varname}}.l = hercules.NewLogger()
   }
   }
   {{.varname}}.OneShotMergeProcessor.Initialize()
   {{.varname}}.OneShotMergeProcessor.Initialize()
   return nil
   return nil