(f *Function, idx int)
| 531 | } |
| 532 | |
| 533 | func regExpVariableFilter(f *Function, idx int) error { |
| 534 | // Value should have been populated from the map that the user gave us in the |
| 535 | // DQL variable map. Let's parse the expression and flags from the variable |
| 536 | // string. |
| 537 | ra, err := parseRegexArgs(f.Args[idx].Value) |
| 538 | if err != nil { |
| 539 | return err |
| 540 | } |
| 541 | // We modify the value of this arg and add a new arg for the flags. Regex functions |
| 542 | // should have two args. |
| 543 | f.Args[idx].Value = ra.expr |
| 544 | f.Args = append(f.Args, Arg{Value: ra.flags}) |
| 545 | return nil |
| 546 | } |
| 547 | |
| 548 | func substituteVariablesFilter(f *FilterTree, vmap varMap) error { |
| 549 | if f == nil { |
no test coverage detected