diff --git a/command/server/config.go b/command/server/config.go index b4eb5b2ed1..4568849e30 100644 --- a/command/server/config.go +++ b/command/server/config.go @@ -155,7 +155,7 @@ func (b *Storage) GoString() string { // ServiceRegistration is the optional service discovery for the server. type ServiceRegistration struct { Type string - Config map[string]string + Config map[string]interface{} } func (b *ServiceRegistration) GoString() string { @@ -864,7 +864,7 @@ func parseServiceRegistration(result *Config, list *ast.ObjectList, name string) key = item.Keys[0].Token.Value().(string) } - var m map[string]string + var m map[string]interface{} if err := hcl.DecodeObject(&m, item.Val); err != nil { return multierror.Prefix(err, fmt.Sprintf("%s.%s:", name, key)) } diff --git a/command/server/config_test_helpers.go b/command/server/config_test_helpers.go index b639a7e01b..e9cba47846 100644 --- a/command/server/config_test_helpers.go +++ b/command/server/config_test_helpers.go @@ -49,7 +49,7 @@ func testLoadConfigFile_topLevel(t *testing.T, entropy *Entropy) { ServiceRegistration: &ServiceRegistration{ Type: "consul", - Config: map[string]string{ + Config: map[string]interface{}{ "foo": "bar", }, }, @@ -135,7 +135,7 @@ func testLoadConfigFile_json2(t *testing.T, entropy *Entropy) { ServiceRegistration: &ServiceRegistration{ Type: "consul", - Config: map[string]string{ + Config: map[string]interface{}{ "foo": "bar", }, }, @@ -277,7 +277,7 @@ func testLoadConfigFile(t *testing.T) { ServiceRegistration: &ServiceRegistration{ Type: "consul", - Config: map[string]string{ + Config: map[string]interface{}{ "foo": "bar", }, }, @@ -347,7 +347,7 @@ func testLoadConfigFile_json(t *testing.T) { ServiceRegistration: &ServiceRegistration{ Type: "consul", - Config: map[string]string{ + Config: map[string]interface{}{ "foo": "bar", }, },