mirror of
https://github.com/spf13/viper
synced 2024-12-23 20:17:03 +00:00
cleanup formatting to pass tests
This commit is contained in:
parent
146fa552dd
commit
bd2a8eace3
2 changed files with 17 additions and 17 deletions
|
@ -82,22 +82,22 @@ func getConfigManager(rp viper.RemoteProvider) (crypt.ConfigManager, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
switch(rp.Provider()) {
|
switch rp.Provider() {
|
||||||
case "etcd":
|
case "etcd":
|
||||||
cm, err = crypt.NewEtcdConfigManager([]string{rp.Endpoint()}, kr)
|
cm, err = crypt.NewEtcdConfigManager([]string{rp.Endpoint()}, kr)
|
||||||
case "consul":
|
case "consul":
|
||||||
cm, err = crypt.NewConsulConfigManager([]string{rp.Endpoint()}, kr)
|
cm, err = crypt.NewConsulConfigManager([]string{rp.Endpoint()}, kr)
|
||||||
case "vault":
|
case "vault":
|
||||||
cm, err = NewVaultConfigManager([]string{rp.Endpoint()}, kr)
|
cm, err = NewVaultConfigManager([]string{rp.Endpoint()}, kr)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switch(rp.Provider()) {
|
switch rp.Provider() {
|
||||||
case "etcd":
|
case "etcd":
|
||||||
cm, err = crypt.NewStandardEtcdConfigManager([]string{rp.Endpoint()})
|
cm, err = crypt.NewStandardEtcdConfigManager([]string{rp.Endpoint()})
|
||||||
case "consul":
|
case "consul":
|
||||||
cm, err = crypt.NewStandardConsulConfigManager([]string{rp.Endpoint()})
|
cm, err = crypt.NewStandardConsulConfigManager([]string{rp.Endpoint()})
|
||||||
case "vault":
|
case "vault":
|
||||||
cm, err = NewStandardVaultConfigManager([]string{rp.Endpoint()})
|
cm, err = NewStandardVaultConfigManager([]string{rp.Endpoint()})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -7,9 +7,9 @@ package remote
|
||||||
// vault, we can make vault work this way.
|
// vault, we can make vault work this way.
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
vault "github.com/spf13/viper/vault"
|
||||||
crypt "github.com/xordataexchange/crypt/config"
|
crypt "github.com/xordataexchange/crypt/config"
|
||||||
vault "github.com/spf13/viper/vault"
|
"io"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewStandardVaultConfigManager(machines []string) (crypt.ConfigManager, error) {
|
func NewStandardVaultConfigManager(machines []string) (crypt.ConfigManager, error) {
|
||||||
|
|
Loading…
Reference in a new issue