From 8c7c5df770e241f2219143c7ca4ba3ca9a7ffd44 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 29 Sep 2015 10:04:09 -0700 Subject: [PATCH] Prober stringer should avoid frivolous newlines --- pkg/probe/probe.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/probe/probe.go b/pkg/probe/probe.go index e662e6f84..c82df6bd1 100644 --- a/pkg/probe/probe.go +++ b/pkg/probe/probe.go @@ -157,19 +157,19 @@ func (e *Error) String() string { defer e.lock.RUnlock() if e.Cause != nil { - str := e.Cause.Error() + "\n" + str := e.Cause.Error() callLen := len(e.CallTrace) for i := callLen - 1; i >= 0; i-- { if len(e.CallTrace[i].Env) > 0 { - str += fmt.Sprintf(" (%d) %s:%d %s(..) Tags: [%s]\n", + str += fmt.Sprintf("\n (%d) %s:%d %s(..) Tags: [%s]", i, e.CallTrace[i].Filename, e.CallTrace[i].Line, e.CallTrace[i].Function, strings.Join(e.CallTrace[i].Env["Tags"], ", ")) } else { - str += fmt.Sprintf(" (%d) %s:%d %s(..)\n", + str += fmt.Sprintf("\n (%d) %s:%d %s(..)", i, e.CallTrace[i].Filename, e.CallTrace[i].Line, e.CallTrace[i].Function) } } - str += " Host:" + e.SysInfo["host.name"] + " | " + str += "\n" + " Host:" + e.SysInfo["host.name"] + " | " str += "OS:" + e.SysInfo["host.os"] + " | " str += "Arch:" + e.SysInfo["host.arch"] + " | " str += "Lang:" + e.SysInfo["host.lang"] + " | "