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
I'm using Viper to read, modify and then write TOML configuration. The issue I have is how Viper handles the configuration structure when writing to TOML file.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm using Viper to read, modify and then write TOML configuration. The issue I have is how Viper handles the configuration structure when writing to TOML file.
My initial config.toml looks like this:
and I would like to modify it to be like this
The go code I'm using:
However, when Viper writes into the config.toml I'm getting unnecessary entry names of all the nested fields.
Is there a way to avoid those extra objects ?
Beta Was this translation helpful? Give feedback.
All reactions