Tweaked parsing error message to quote properly

pull/3332/head
Preetha Appan 2017-07-28 17:52:35 -05:00
parent 5aeab1463b
commit 2d84cd2330
2 changed files with 2 additions and 2 deletions

View File

@ -2143,7 +2143,7 @@ func (c *Config) ResolveTmplAddrs() (err error) {
return
}
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
}

View File

@ -73,7 +73,7 @@ func TestDecodeConfig(t *testing.T) {
},
{
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"}},
},