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

Decoder: prevent duplicates of inline tables #667

Merged
merged 3 commits into from Nov 10, 2021
Merged

Decoder: prevent duplicates of inline tables #667

merged 3 commits into from Nov 10, 2021

Conversation

pelletier
Copy link
Owner

Fixes #666

Also provides the error message

toml: key a is already defined

instead of the previously

toml: expected a to be a table, not a value

This fixes the error at hand, but it's probably worth providing contextualized errors like DecodeError, that points where the problem occurred and if not too costly where the source was.

@pelletier pelletier added the bug Issues describing a bug in go-toml. label Nov 10, 2021
@pelletier pelletier merged commit 4dff8ea into v2 Nov 10, 2021
@pelletier pelletier deleted the issue-666 branch November 10, 2021 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues describing a bug in go-toml.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant