From bd2a8eace365ff324c62871682157bda038d2d9f Mon Sep 17 00:00:00 2001 From: John Adams Date: Mon, 14 May 2018 14:37:53 -0700 Subject: [PATCH] cleanup formatting to pass tests --- remote/remote.go | 28 ++++++++++++++-------------- remote/vault_stub.go | 6 +++--- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/remote/remote.go b/remote/remote.go index ccc673e..a84db35 100644 --- a/remote/remote.go +++ b/remote/remote.go @@ -82,22 +82,22 @@ func getConfigManager(rp viper.RemoteProvider) (crypt.ConfigManager, error) { if err != nil { return nil, err } - switch(rp.Provider()) { - case "etcd": - cm, err = crypt.NewEtcdConfigManager([]string{rp.Endpoint()}, kr) - case "consul": - cm, err = crypt.NewConsulConfigManager([]string{rp.Endpoint()}, kr) - case "vault": - cm, err = NewVaultConfigManager([]string{rp.Endpoint()}, kr) + switch rp.Provider() { + case "etcd": + cm, err = crypt.NewEtcdConfigManager([]string{rp.Endpoint()}, kr) + case "consul": + cm, err = crypt.NewConsulConfigManager([]string{rp.Endpoint()}, kr) + case "vault": + cm, err = NewVaultConfigManager([]string{rp.Endpoint()}, kr) } } else { - switch(rp.Provider()) { - case "etcd": - cm, err = crypt.NewStandardEtcdConfigManager([]string{rp.Endpoint()}) - case "consul": - cm, err = crypt.NewStandardConsulConfigManager([]string{rp.Endpoint()}) - case "vault": - cm, err = NewStandardVaultConfigManager([]string{rp.Endpoint()}) + switch rp.Provider() { + case "etcd": + cm, err = crypt.NewStandardEtcdConfigManager([]string{rp.Endpoint()}) + case "consul": + cm, err = crypt.NewStandardConsulConfigManager([]string{rp.Endpoint()}) + case "vault": + cm, err = NewStandardVaultConfigManager([]string{rp.Endpoint()}) } } if err != nil { diff --git a/remote/vault_stub.go b/remote/vault_stub.go index 603aa79..9e7f3ee 100644 --- a/remote/vault_stub.go +++ b/remote/vault_stub.go @@ -7,9 +7,9 @@ package remote // vault, we can make vault work this way. import ( - "io" - crypt "github.com/xordataexchange/crypt/config" - vault "github.com/spf13/viper/vault" + vault "github.com/spf13/viper/vault" + crypt "github.com/xordataexchange/crypt/config" + "io" ) func NewStandardVaultConfigManager(machines []string) (crypt.ConfigManager, error) {