mirror of
https://github.com/spf13/viper
synced 2024-11-05 04:37:02 +00:00
1a0c4a370c
* Added method to write into TOML file. * Added functionality to export configuration based on config type. The feature supports JSON and TOML. * Added method to write into YAML file. * Fixed the issue of incorrect defer and error checking order. The error checking must be first otherwise it will cause panic. * Add WriteConfig methods * Add support for toml * Add shared write function and safe methods * Fix incorrectly modified imports * Remove extra comments * Fix spelling * Make marshal spelling consistent throughout * Add support for remaining configuration types This commit moves a significant portion of the code back to viper.go to facilitate having access to the object when reading the files. The purpose is to add properties to the viper object at read time, so that we can add the comments back to the file when writing. * Add tests for each written file type * Modify test for updated HCL specification * Modify to only support HCL write in Go 1.7 * Revert "Modify to only support HCL write in Go 1.7" This reverts commit 12b34bc4eb92cbf8ebfd56b79519f448607e3e51. * Need to truncate the file before writing * Write all settings including overrides * Use filename variable * Lint remote.go * Fix toml return count error |
||
---|---|---|
.. | ||
remote.go |