AddSecureRemoteProvider adds the secret keyring to the default provider struct

This commit is contained in:
Kiril Zvezdarov 2015-06-21 19:19:00 -04:00
parent 8e930a9714
commit db7ff930a1

View file

@ -315,9 +315,10 @@ func (v *Viper) AddSecureRemoteProvider(provider, endpoint, path, secretkeyring
if provider != "" && endpoint != "" { if provider != "" && endpoint != "" {
jww.INFO.Printf("adding %s:%s to remote provider list", provider, endpoint) jww.INFO.Printf("adding %s:%s to remote provider list", provider, endpoint)
rp := &defaultRemoteProvider{ rp := &defaultRemoteProvider{
endpoint: endpoint, endpoint: endpoint,
provider: provider, provider: provider,
path: path, path: path,
secretKeyring: secretkeyring,
} }
if !v.providerPathExists(rp) { if !v.providerPathExists(rp) {
v.remoteProviders = append(v.remoteProviders, rp) v.remoteProviders = append(v.remoteProviders, rp)