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

Fix "null" golang string encoded as yaml null #473

Closed
wants to merge 1 commit into from

Conversation

denieryd
Copy link
Contributor

This PR fixing this open issue: 413

Solution: incorporate each keyword from reservedNullKeywords into reservedEncKeywordMap to indicate that null keywords should be enclosed in quotes. This ensures that only Golang's nil is represented as YAML null.

Currently, any string from reservedNullKeywords is being encoded as YAML null, which is not the intended behavior and may cause confusion. Because users use Golang's nil if they want YAML null and for some reason "null" string if they want string in yaml document

This fix reverts the some behavior that was erroneously changed in this this commit. Prior to this commit, only Golang's nil was represented as YAML null.

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.79%. Comparing base (3a90d71) to head (2dfbce5).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #473      +/-   ##
==========================================
+ Coverage   78.78%   78.79%   +0.01%     
==========================================
  Files          13       13              
  Lines        4007     4009       +2     
==========================================
+ Hits         3157     3159       +2     
  Misses        591      591              
  Partials      259      259              

@denieryd denieryd closed this Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants