diff --git a/agent/config.go b/agent/config.go index cc0958c85d..c6679064ec 100644 --- a/agent/config.go +++ b/agent/config.go @@ -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 } diff --git a/agent/config_test.go b/agent/config_test.go index 13b3738c2a..101f87b8f2 100644 --- a/agent/config_test.go +++ b/agent/config_test.go @@ -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"}}, },