CustomDecorator appends an InterpreterDecorator to the program. InterpretableDecorators can be used to inspect, alter, or replace the Program plan.
(dec interpreter.InterpretableDecorator)
| 465 | // |
| 466 | // InterpretableDecorators can be used to inspect, alter, or replace the Program plan. |
| 467 | func CustomDecorator(dec interpreter.InterpretableDecorator) ProgramOption { |
| 468 | return func(p *prog) (*prog, error) { |
| 469 | p.plannerOptions = append(p.plannerOptions, interpreter.CustomDecorator(dec)) |
| 470 | return p, nil |
| 471 | } |
| 472 | } |
| 473 | |
| 474 | // CustomDecoratorV2 appends an InterpreterDecoratorV2 to the program. |
| 475 | func CustomDecoratorV2(dec interpreter.InterpretableDecoratorV2) ProgramOption { |