From 2d84cd2330e116b7df0208d2421de2d425a5958e Mon Sep 17 00:00:00 2001 From: Preetha Appan Date: Fri, 28 Jul 2017 17:52:35 -0500 Subject: [PATCH] Tweaked parsing error message to quote properly --- agent/config.go | 2 +- agent/config_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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"}}, },