diff --git a/lang/funcs/facts/func.go b/lang/funcs/facts/func.go index 25bc43bc5d..7bab566a5e 100644 --- a/lang/funcs/facts/func.go +++ b/lang/funcs/facts/func.go @@ -79,3 +79,13 @@ func (obj *FactFunc) Init(init *interfaces.Init) error { func (obj *FactFunc) Stream(ctx context.Context) error { return obj.Fact.Stream(ctx) } + +// Call means this function implements the CallableFunc interface and can be +// called statically if we want to do it speculatively or from a resource. +func (obj *FactFunc) Call(args []types.Value) (types.Value, error) { + if i, j := len(args), 0; i != j { + return nil, fmt.Errorf("arg length doesn't match, got %d, exp: %d", i, j) + } + + return obj.Fact.Call() +}