pelletier / go-toml

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

encoder: add back the commented option #893

Closed pelletier closed 1 year ago

pelletier commented 1 year ago

This patch adds back the commented field option from go-toml v1. I initially cut it from scope stating that it should belong in a full-fledge document model, but I've decided to bring it back to support the use case of generating configuration files with commented out sections.

As with the other field tags, it is merged as an option in the toml tag (see updated README.md).