mirror of
https://github.com/spf13/viper
synced 2024-12-22 19:47:01 +00:00
removing some debugging printlns
This commit is contained in:
parent
ea04102003
commit
5e1d5e7207
1 changed files with 4 additions and 7 deletions
11
viper.go
11
viper.go
|
@ -118,6 +118,7 @@ func AddRemoteProvider(provider, endpoint, path string) error {
|
||||||
rp := &remoteProvider{
|
rp := &remoteProvider{
|
||||||
endpoint: endpoint,
|
endpoint: endpoint,
|
||||||
provider: provider,
|
provider: provider,
|
||||||
|
path: path,
|
||||||
}
|
}
|
||||||
if !providerPathExists(rp) {
|
if !providerPathExists(rp) {
|
||||||
remoteProviders = append(remoteProviders, rp)
|
remoteProviders = append(remoteProviders, rp)
|
||||||
|
@ -136,7 +137,7 @@ func AddRemoteProvider(provider, endpoint, path string) error {
|
||||||
// you should set path to /configs and set config name (SetConfigName()) to
|
// you should set path to /configs and set config name (SetConfigName()) to
|
||||||
// "myapp"
|
// "myapp"
|
||||||
// Secure Remote Providers are implemented with github.com/xordataexchange/crypt
|
// Secure Remote Providers are implemented with github.com/xordataexchange/crypt
|
||||||
func AddSecureRemoteProvider(provider, endpoint, secretkeyring string) error {
|
func AddSecureRemoteProvider(provider, endpoint, path, secretkeyring string) error {
|
||||||
if !stringInSlice(provider, SupportedRemoteProviders) {
|
if !stringInSlice(provider, SupportedRemoteProviders) {
|
||||||
return UnsupportedRemoteProviderError(provider)
|
return UnsupportedRemoteProviderError(provider)
|
||||||
}
|
}
|
||||||
|
@ -145,6 +146,7 @@ func AddSecureRemoteProvider(provider, endpoint, secretkeyring string) error {
|
||||||
rp := &remoteProvider{
|
rp := &remoteProvider{
|
||||||
endpoint: endpoint,
|
endpoint: endpoint,
|
||||||
provider: provider,
|
provider: provider,
|
||||||
|
path: path,
|
||||||
}
|
}
|
||||||
if !providerPathExists(rp) {
|
if !providerPathExists(rp) {
|
||||||
remoteProviders = append(remoteProviders, rp)
|
remoteProviders = append(remoteProviders, rp)
|
||||||
|
@ -460,11 +462,6 @@ func ReadInConfig() error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
err = getKeyValueConfig()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
MarshallReader(bytes.NewReader(file), config)
|
MarshallReader(bytes.NewReader(file), config)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -553,7 +550,7 @@ func getEtcdConfig(provider *remoteProvider) (map[string]interface{}, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
b, err := cm.Get(configFile)
|
b, err := cm.Get(provider.path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue