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

panic if the input YAML is invalid #471

Closed
shibukawa opened this issue Aug 31, 2024 · 2 comments · Fixed by #490
Closed

panic if the input YAML is invalid #471

shibukawa opened this issue Aug 31, 2024 · 2 comments · Fixed by #490
Labels
bug Something isn't working

Comments

@shibukawa
Copy link

Describe the bug

Panic happens if the input YAML for parsing is invalid

To Reproduce

https://go.dev/play/p/GmmnASxJ2VV

Expected behavior

return err

Screenshots

Version Variables

  • Go version: 1.23
  • go-yaml's Version: v1.12.0

Additional context

@shibukawa shibukawa added the bug Something isn't working label Aug 31, 2024
@shibukawa
Copy link
Author

https://yaml.org/spec/1.2.2/#72-empty-nodes

This document seems to say, expected result is "null" instead of error

@goccy
Copy link
Owner

goccy commented Oct 30, 2024

Thank you for your reporting ! I've fixed this problem with #490

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants