(f FuncFn, argsE ast.Expressions)
| 29 | } |
| 30 | |
| 31 | func callFnExecutor(f FuncFn, argsE ast.Expressions) (expressionExecutor, error) { |
| 32 | return func(ctx context.Context, options *Options, data *model.Value) (*model.Value, error) { |
| 33 | ctx = WithExecutorID(ctx, "callFnExpr") |
| 34 | args, err := prepareArgs(ctx, options, data, argsE) |
| 35 | if err != nil { |
| 36 | return nil, fmt.Errorf("error preparing arguments: %w", err) |
| 37 | } |
| 38 | |
| 39 | res, err := f(ctx, data, args) |
| 40 | if err != nil { |
| 41 | return nil, fmt.Errorf("error executing function: %w", err) |
| 42 | } |
| 43 | |
| 44 | return res, nil |
| 45 | }, nil |
| 46 | } |
| 47 | |
| 48 | var unstableFuncs = []string{ |
| 49 | "ignore", |
no test coverage detected