lang: Add debug flag and Logf to fact init struct

This commit is contained in:
Kevin Kuehler
2019-01-16 00:43:10 -08:00
committed by James Shubin
parent db1cc846dc
commit 34550246f4
2 changed files with 4 additions and 0 deletions

View File

@@ -68,6 +68,8 @@ type Init struct {
//Noop bool //Noop bool
Output chan types.Value // Stream must close `output` chan Output chan types.Value // Stream must close `output` chan
World engine.World World engine.World
Debug bool
Logf func(format string, v ...interface{})
} }
// Fact is the interface that any valid fact must fulfill. It is very simple, // Fact is the interface that any valid fact must fulfill. It is very simple,

View File

@@ -62,6 +62,8 @@ func (obj *FactFunc) Init(init *interfaces.Init) error {
Hostname: init.Hostname, Hostname: init.Hostname,
Output: init.Output, Output: init.Output,
World: init.World, World: init.World,
Debug: init.Debug,
Logf: init.Logf,
}, },
) )
} }