Golang配置文件管理神器Viper(下)

原文:SafeWriteConfig – writes the current viper configuration to the predefined path. Errors if no predefined path. Will not overwrite the current config file, if it exists.

Golang配置文件管理神器Viper(上)

配置文件管理是我们在开发过程中必须重视的一个环节。支持读取JSON TOML YAML HCL 和Java属性配置文件.

Viper 加载远程配置的填坑之旅

在文档中可以找到如下描述:Viper uses crypt to retrieve configuration from the K/V store, which means that you can store your configuration values encrypted and have them automatically decrypted if you have the correct gpg keyring. Encryption is optional.