-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Bugfix (v3): Marshal yaml 1.1 bool strings as explicit strings #490
Conversation
otherwise tests of functions that do not exist in v2 fail
Well that's interesting I'll have to look into that |
Seems it was the CI import path |
@niemeyer Could you please consider merging this PR? I'm currently using go-yaml v3 to unmarshal a YAML file, make some changes to a few structs and marshal it back into YAML. Due to this specific bug, |
this also fixes #214, which the issue I opened is a dupe of... |
Obsoleted by #583 . |
return true | ||
case "n", "N", "no", "No", "NO", "off", "Off", "OFF": | ||
out.SetBool(false) | ||
val, found := boolMap[resolved] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this still decode y
as true?
String values matching a boolean literal from the yaml 1.1 spec should be rendered with quotes to ensure backwards compatibility. This fixes #489.