mirror of
https://github.com/spf13/viper
synced 2024-12-22 03:27:03 +00:00
remote: fix two dropped errors
This commit is contained in:
parent
99520c81d8
commit
583f79b3ea
1 changed files with 3 additions and 2 deletions
|
@ -77,11 +77,12 @@ func getConfigManager(rp viper.RemoteProvider) (crypt.ConfigManager, error) {
|
|||
var err error
|
||||
|
||||
if rp.SecretKeyring() != "" {
|
||||
kr, err := os.Open(rp.SecretKeyring())
|
||||
defer kr.Close()
|
||||
var kr *os.File
|
||||
kr, err = os.Open(rp.SecretKeyring())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer kr.Close()
|
||||
if rp.Provider() == "etcd" {
|
||||
cm, err = crypt.NewEtcdConfigManager([]string{rp.Endpoint()}, kr)
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue