mirror of https://github.com/spf13/viper.git
remote: fix two dropped errors
This commit is contained in:
parent
99520c81d8
commit
583f79b3ea
|
@ -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 New Issue