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