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

"y" in key interpreted as "true" #283

Closed
strin opened this issue Sep 21, 2017 · 1 comment
Closed

"y" in key interpreted as "true" #283

strin opened this issue Sep 21, 2017 · 1 comment

Comments

@strin
Copy link

strin commented Sep 21, 2017

yaml.Unmarshal for the following config will interpret "y" as true.

y: 1

This will lead to a map {true: 1}.

@rogpeppe
Copy link
Contributor

Yes, there are many possible values for boolean, because go-yaml supports YAML 1.1.
See http://yaml.org/type/bool.html for the full list. I agree that this is not ideal - I've been caught by it many times in the past.

I think this is essentially a duplicate of #214, so closing in favour of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants