CustomDecorator appends an InterpreterDecorator to the program. InterpretableDecorators can be used to inspect, alter, or replace the Program plan.
(dec interpreter.InterpretableDecorator)
| 516 | // |
| 517 | // InterpretableDecorators can be used to inspect, alter, or replace the Program plan. |
| 518 | func CustomDecorator(dec interpreter.InterpretableDecorator) ProgramOption { |
| 519 | return func(p *prog) (*prog, error) { |
| 520 | p.plannerOptions = append(p.plannerOptions, interpreter.CustomDecorator(dec)) |
| 521 | return p, nil |
| 522 | } |
| 523 | } |
| 524 | |
| 525 | // CustomDecoratorV2 appends an InterpreterDecoratorV2 to the program. |
| 526 | func CustomDecoratorV2(dec interpreter.InterpretableDecoratorV2) ProgramOption { |