You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. Does go-toml v2 support keeping the commented out lines of a TOML file when unmarshaling and marshaling?
I'm manipulating a TOML based configuration file and eventually, commented out lines are getting clean up. It would be nice to have an option to keep them as it is.
Example
# The CRI-O configuration file specifies all of the available configuration
# options and command-line flags for the crio(8) OCI Kubernetes Container Runtime
# daemon, but in a TOML format that can be more easily modified and versioned.
#
# Please refer to crio.conf(5) for details of all configuration options.
[crio]
The text was updated successfully, but these errors were encountered:
You can also use the unstable.AST to parse the document, keeping comments. However there is no easy way to write it back out at the moment. You should be able to generate your own struct types dynamically to achieve this. Check out #822 about this topic – pull request to add encoder methods to the unstable.AST would be welcomed!
Hi. Does go-toml v2 support keeping the commented out lines of a TOML file when unmarshaling and marshaling?
I'm manipulating a TOML based configuration file and eventually, commented out lines are getting clean up. It would be nice to have an option to keep them as it is.
Example
The text was updated successfully, but these errors were encountered: