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

Missed position when decoding invalid zero-started number #742

Closed
arkoort opened this issue Mar 5, 2022 · 2 comments
Closed

Missed position when decoding invalid zero-started number #742

arkoort opened this issue Mar 5, 2022 · 2 comments
Labels
bug Issues describing a bug in go-toml. v2-fixed This bug is present in v1 and has been solved in v2

Comments

@arkoort
Copy link

arkoort commented Mar 5, 2022

Describe the bug
When toml file contains invalid number, there's no position in the file reported.

To Reproduce
echo 'qwe = 001' | tomll

Expected behavior
(1, 7): invalid base
but reported:
invalid base

Versions

  • go-toml: version 1.8.1
  • go: 1.15.9-6
  • operating system: Linux Debian

Additional context
This version is distributed in Debian Testing

@pelletier
Copy link
Owner

Thanks for reporting the bug! As this is on the v1 branch, I won't be actively working on it, but gladly accept a patch! This report made me notice that v2's tomll doesn't report error lines anymore, which I'll track in a new issue.

@pelletier pelletier added the bug Issues describing a bug in go-toml. label Mar 23, 2022
@pelletier pelletier added the v2-fixed This bug is present in v1 and has been solved in v2 label Apr 8, 2022
@pelletier
Copy link
Owner

Closing this issue, as go-toml v2.0.0 has been released and does not have this problem. As go-toml v1 will not be receiving any updates, please look into upgrading to the new version.

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. v2-fixed This bug is present in v1 and has been solved in v2
Projects
None yet
Development

No branches or pull requests

2 participants