CustomDecorator appends an InterpreterDecorator to the program. InterpretableDecorators can be used to inspect, alter, or replace the Program plan.
(dec interpreter.InterpretableDecorator)
| 450 | // |
| 451 | // InterpretableDecorators can be used to inspect, alter, or replace the Program plan. |
| 452 | func CustomDecorator(dec interpreter.InterpretableDecorator) ProgramOption { |
| 453 | return func(p *prog) (*prog, error) { |
| 454 | p.plannerOptions = append(p.plannerOptions, interpreter.CustomDecorator(dec)) |
| 455 | return p, nil |
| 456 | } |
| 457 | } |
| 458 | |
| 459 | // CustomDecoratorV2 appends an InterpreterDecoratorV2 to the program. |
| 460 | func CustomDecoratorV2(dec interpreter.InterpretableDecoratorV2) ProgramOption { |