pelletier / go-toml

Go library for the TOML file format
https://github.com/pelletier/go-toml
Other
1.7k stars 209 forks source link

Missed position when decoding invalid zero-started number #742

Closed arkoort closed 2 years ago

arkoort commented 2 years ago

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

Additional context This version is distributed in Debian Testing

pelletier commented 2 years ago

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 commented 2 years ago

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.