skip Env in json printinf if empty

This commit is contained in:
Anand Babu (AB) Periasamy 2015-08-19 01:21:28 -07:00
parent 56c548c133
commit 826202716f
1 changed files with 4 additions and 4 deletions

View File

@ -51,10 +51,10 @@ func GetSysInfo() map[string]string {
}
type TracePoint struct {
Line int `json:"Line"`
Filename string `json:"File"`
Function string `json:"Func"`
Env map[string][]string `json:"Env"`
Line int `json:"Line,omitempty"`
Filename string `json:"File,omitempty"`
Function string `json:"Func,omitempty"`
Env map[string][]string `json:"Env,omitempty"`
}
// Error implements tracing error functionality.