ProgramOptions implements the cel.Library interface method
()
| 168 | |
| 169 | // ProgramOptions implements the cel.Library interface method |
| 170 | func (r *regexLib) ProgramOptions() []cel.ProgramOption { |
| 171 | return []cel.ProgramOption{ |
| 172 | cel.CostTrackerOptions( |
| 173 | interpreter.OverloadCostTracker("regex_extract_string_string", extractCostTracker()), |
| 174 | interpreter.OverloadCostTracker("regex_extractAll_string_string", extractAllCostTracker()), |
| 175 | interpreter.OverloadCostTracker("regex_replace_string_string_string", replaceCostTracker()), |
| 176 | interpreter.OverloadCostTracker("regex_replace_string_string_string_int", replaceCostTracker()), |
| 177 | ), |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | func regReplace(args ...ref.Val) ref.Val { |
| 182 | target := args[0].(types.String) |
nothing calls this directly
no test coverage detected