Skip to content
Snippets Groups Projects
Commit 1b7bb0ea authored by Manish R Jain's avatar Manish R Jain
Browse files

Attempt at map[string]interface{} panic bug

parent 959d9cf3
Branches
No related tags found
No related merge requests found
...@@ -240,7 +240,10 @@ func (g *SubGraph) ToJson(l *Latency) (js []byte, rerr error) { ...@@ -240,7 +240,10 @@ func (g *SubGraph) ToJson(l *Latency) (js []byte, rerr error) {
l.Json = time.Since(l.Start) - l.Parsing - l.Processing l.Json = time.Since(l.Start) - l.Parsing - l.Processing
if len(r) == 1 { if len(r) == 1 {
for _, ival := range r { for _, ival := range r {
m := ival.(map[string]interface{}) var m map[string]interface{}
if ival != nil {
m = ival.(map[string]interface{})
}
m["server_latency"] = l.ToMap() m["server_latency"] = l.ToMap()
return json.Marshal(m) return json.Marshal(m)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment