-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is slightly hacky. See https://stackoverflow.com/questions/52339336/removal-of-key-value-pair-from-viper-config-file > TLDR; This is dangerous and doesn't work. This method doesn't work in tricky ways. If you viper.Set a key at all for the path then the viper.Get will return the map from the override list, which then won't let you delete any keys in the config list. So if your app adds and removes things, you may find it fails to delete with this method. – [Will Brode](https://stackoverflow.com/users/1139197/will-brode) Commented May 11, 2023 at 7:29 In our specific use case, it seems to work just fine.
- Loading branch information
1 parent
b6384b1
commit e08840d
Showing
2 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters