pelletier / go-toml

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

Decode: incorrect table redefinition error #739

Closed jmooring closed 2 years ago

jmooring commented 2 years ago

table bar already exists

[foo.bar.baz]
wibble = 'wobble'

[foo]

[foo.bar]
huey = 'dewey'
jmooring commented 2 years ago

Just to clarify, this is a regression.

pelletier commented 2 years ago

Thank you for the report! I think https://github.com/pelletier/go-toml/issues/703 was too aggressive in preventing table redefinition.

pelletier commented 2 years ago

This should be fixed as of https://github.com/pelletier/go-toml/commit/89d7b412d87493fafefc8cf0612fd0652bec374e. Let me know if you have any issue with it!