-
Notifications
You must be signed in to change notification settings - Fork 447
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
Feature request: add toYaml/fromYaml functions #358
Feature request: add toYaml/fromYaml functions #358
Comments
In the same vein of Masterminds#223, add YAML conversion functions. Fixes Masterminds#358.
any update on this? |
* feat: add yaml to/from functions In the same vein of Masterminds#223, add YAML conversion functions. Fixes Masterminds#358. * chore: bump yaml version to v3 --------- Co-authored-by: Blake Pettersson <[email protected]>
any update on this ? many developer are waiting for this feature. |
## Description We continue to backport features, bug fixes, and more from Sprig to Sprout. This time, I'm focusing on the YAML functions part, used by Helm and intended for use by others as well. ## Changes - Add `fromYaml` function to convert yaml string into a go map - Add `toYaml` function to convert any to a yaml string - Add `mustFromYaml` function to convert and return error to the template system when occurs - Add `mustToYaml` function to convert and return error to the template system when occurs ## Fixes Masterminds/sprig#358 Masterminds/sprig#360 ## Checklist - [x] I have read the **CONTRIBUTING.md** document. - [x] My code follows the code style of this project. - [x] I have added tests to cover my changes. - [x] All new and existing tests passed. - [ ] I have updated the documentation accordingly. - [x] This change requires a change to the documentation on the website. ## Additional Information The documentation for the encoding part of the library will be released soon after this pull request on https://sprout.atom.codes Initially implemented by @blakepettersson on sprig
Hello everyone 👋, I wanted to let you know that this issue has been addressed in the fork of this project at go-sprout/sprout. The fix has been implemented starting from version For those looking for a solution, I recommend checking out the latest releases of the fork. This should help address the issue discussed in this thread. Thank you! |
Experiencing the sprig library as a great tool set so far, I was a bit surprised there are no
toYaml
/fromYaml
functions in here. It would be great to have them analogous to the Helm implementation.I'm not a go developer, but I could try to create a PR similar to #223 if you feel comfortable with the general idea of adding
toYaml
/fromYaml
functions :)The text was updated successfully, but these errors were encountered: