Skip to content
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

feat: implement yaml functions based on helm implementation #36

Merged
merged 2 commits into from
May 16, 2024

Conversation

42atomys
Copy link
Member

@42atomys 42atomys commented May 16, 2024

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#358 Masterminds#360

Checklist

  • I have read the CONTRIBUTING.md document.
  • My code follows the code style of this project.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation accordingly.
  • 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

@42atomys 42atomys self-assigned this May 16, 2024
@42atomys 42atomys added domain/obvious 🟩 Represents the "known knowns" issue. It's Obviously type/feature ⭐ Addition of new feature aspect/dex 🤖 Concerns developers' experience with the codebase priority/medium 🟨 Priority 3 - Not blocking but should be fixed soon labels May 16, 2024
@42atomys 42atomys added this to the v1.0 milestone May 16, 2024
Copy link

codecov bot commented May 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Files Coverage Δ
encoding_functions.go 100.0% <100.0%> (ø)
sprout.go 100.0% <100.0%> (ø)

@42atomys 42atomys merged commit a73c7d9 into main May 16, 2024
14 checks passed
@42atomys 42atomys deleted the feat/yaml-encoding-functions branch May 16, 2024 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aspect/dex 🤖 Concerns developers' experience with the codebase domain/obvious 🟩 Represents the "known knowns" issue. It's Obviously priority/medium 🟨 Priority 3 - Not blocking but should be fixed soon type/feature ⭐ Addition of new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: add toYaml/fromYaml functions
1 participant