lang: Add debug flag and Logf to fact init struct
This commit is contained in:
committed by
James Shubin
parent
db1cc846dc
commit
34550246f4
@@ -68,6 +68,8 @@ type Init struct {
|
||||
//Noop bool
|
||||
Output chan types.Value // Stream must close `output` chan
|
||||
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,
|
||||
|
||||
@@ -62,6 +62,8 @@ func (obj *FactFunc) Init(init *interfaces.Init) error {
|
||||
Hostname: init.Hostname,
|
||||
Output: init.Output,
|
||||
World: init.World,
|
||||
Debug: init.Debug,
|
||||
Logf: init.Logf,
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user