From ac928b5092fbcde276b68e3bb4b2f2ed4bcaebb3 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 18 Aug 2015 23:37:10 -0700 Subject: [PATCH] Fix typo in probe --- 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 9aada45e4..de8c0250e 100644 --- a/pkg/probe/probe.go +++ b/pkg/probe/probe.go @@ -60,9 +60,9 @@ type tracePoint struct { // Error implements tracing error functionality. type Error struct { lock sync.RWMutex - Cause error `json:"cause"` - CallTrace []tracePoint `json:"trace"` - SysInfo map[string]string `json:"sysinfo"` + Cause error `json:"cause,omitempty"` + CallTrace []tracePoint `json:"trace,omitempty"` + SysInfo map[string]string `json:"sysinfo,omitempty"` } // NewError function instantiates an error probe for tracing. Original errors.error (golang's error @@ -122,7 +122,7 @@ func (e *Error) Untrace() { e.CallTrace = e.CallTrace[:l-1] } -// ToError returns original error message. +// ToGoError returns original error message. func (e *Error) ToGoError() error { return e.Cause }