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
|
//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,
|
||||||
|
|||||||
@@ -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,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user