Braking Execution of a Template
See original GitHub issueI tried to use your “ret” command to stop the execution of a template if a pre condition is not filled. But i’ve noticed that this effects other templates too, so they also got not rendered, still if they don’t have such pre conditions. Is there any better option to exit the template execution?
{{~ if !Settings.FlagA || !Settings.FlagB; ret; end; ~}}
This works well, if i inverse the condition, but that is not my prefered solution:
{{~ if Settings.FlagA && Settings.FlagB ~}}
...
{{~ end ~}}
I also tried this, with the same strange result:
{{~ if !Settings.FlagA || !Settings.FlagB ~}}
{{~ ret ~}}
{{~ end ~}}
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Stop a pipeline execution in CodePipeline
The execution is in a Stopping state until the in-progress actions are complete. Then the execution is in a Stopped state. The stage...
Read more >text/template - Go Packages
Templates are executed by applying them to a data structure. Annotations in the template refer to elements of the data structure (typically a...
Read more >Can't execute code in break mode
You enter break mode when you suspend execution of code. This error has the following causes and solutions: You tried to run code...
Read more >Redirect is rendering template rather than stopping ...
I have a Laravel 4 application where I check if the user is authenticated and if not it redirects them to the login...
Read more >Modeling an Anti-Lock Braking System - MATLAB & Simulink
This example shows how to model a simple model for an Anti-Lock Braking System (ABS). It simulates the dynamic behavior of a vehicle...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed in 2.1.3 coming later today.
thank you 😃