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

FormatError unexpectedly includes source #517

Closed
markdumay opened this issue Nov 11, 2024 · 2 comments · Fixed by #535
Closed

FormatError unexpectedly includes source #517

markdumay opened this issue Nov 11, 2024 · 2 comments · Fixed by #535
Labels
bug Something isn't working

Comments

@markdumay
Copy link

Describe the bug
The function FormatError includes an argument inclSource. When set to true, the error message should contain snippets of the YAML source that was used. However, setting inclSource to false still displays the YAML source snippet.

To Reproduce
https://go.dev/play/p/0rFUNptzt1t

Expected behavior
When inclSource is set to false, FormatError() should not include the YAML source snippet in the rendered error message.

Screenshots
N/A

Version Variables

  • Go version: v1.23
  • go-yaml's Version: v1.13.7

Additional context
N/A

@goccy
Copy link
Owner

goccy commented Nov 14, 2024

Thank you for your reports ! I've fixed this problem with v1.14.1 !

@markdumay
Copy link
Author

Thanks @goccy!

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
2 participants