pelletier / go-toml

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

Marshaling array table doesn't emit struct tag comment #774

Closed gcstang closed 2 years ago

gcstang commented 2 years ago

Describe the bug Still no comment in v2.0.0 of the API, was supposed to be fixed here #595

To Reproduce Steps to reproduce the behavior. Including TOML files. (Example Go File attached, gzipped so it would let me attach them)

Expected behavior Setting the toml comment should work on all array types In example [[scp]] doesn't include it's comment

Versions

Additional context Add any other context about the problem here that you think may help to diagnose. main.go.gz go.sum.gz go.mod.gz demo.toml.gz

pelletier commented 2 years ago

Thank you for filing the issue.

Playground link to reproduce: https://go.dev/play/p/sLezx1tt0yR

pelletier commented 2 years ago

Should be fixed as of https://github.com/pelletier/go-toml/commit/627dade0c796e720205e26fc875d33db3e548122.