-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for YAML list syntax in loops #194
Comments
Greetings! Thanks for trying things out, asking questions and making suggestions, love it! Just recovering from KubeCon here. It's interesting to me how you formed that expression. The I would have:
Start in data mode. We made an early decision to not allow You can do this but the result is different:
Here we switched to data mode to use I think you are better off to get more comfortable with YS code. It's powerful and concise and becoming more so. But we're always keen on ways to improve, so keep the ideas coming please. |
Also make sure you play around with |
Thinking about "templating", YS is good at it in various contexts. Related to what you posted, this:
produces:
Play around with that and see what you can come up with. Keen to hear about it! |
That last one was only meant to show that there are lots and lots of ways to accomplish things in YS. |
Thanks for your presentation at KubeCon. I'm interested in how
yamlscript
could function as a templating engine on top of YAML.While playing around with some examples with this in mind, I found the following behavior surprising.
Given the following program:
The following is produced:
When considering
ys
as a templating engine for YAML, support for the following syntax feels more natural:Here, there is an explicit list syntax rather than the list syntax output being implicit. However, a program in this form results in
Any chance you would support this more explicit syntax? This support would likely feel more familiar to
helm
users currently leveraging go templates.The text was updated successfully, but these errors were encountered: