mirror of https://github.com/hashicorp/consul
Tweaked parsing error message to quote properly
parent
5aeab1463b
commit
2d84cd2330
|
@ -2143,7 +2143,7 @@ func (c *Config) ResolveTmplAddrs() (err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if socketAllowed && socketPath(ip) == "" && ipAddr == nil {
|
if socketAllowed && socketPath(ip) == "" && ipAddr == nil {
|
||||||
err = fmt.Errorf("Failed to parse %s, is not a valid IP address or socket: %v", name, ip)
|
err = fmt.Errorf("Failed to parse %s, %q is not a valid IP address or socket", name, ip)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ func TestDecodeConfig(t *testing.T) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
in: `{"addresses":{"http":"notunix://blah"}}`,
|
in: `{"addresses":{"http":"notunix://blah"}}`,
|
||||||
parseTemplateErr: errors.New("Failed to parse HTTP address, is not a valid IP address or socket: notunix://blah"),
|
parseTemplateErr: errors.New("Failed to parse HTTP address, \"notunix://blah\" is not a valid IP address or socket"),
|
||||||
c: &Config{Addresses: AddressConfig{HTTP: "notunix://blah"}},
|
c: &Config{Addresses: AddressConfig{HTTP: "notunix://blah"}},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue