(data interface{})
| 114 | } |
| 115 | |
| 116 | func (r *Renderer) JSONCompactResult(data interface{}) { |
| 117 | b, err := json.Marshal(data) |
| 118 | if err != nil { |
| 119 | r.Errorf("couldn't marshal results as JSON: %v", err) |
| 120 | return |
| 121 | } |
| 122 | |
| 123 | r.Output(ansi.ColorizeJSON(string(b))) |
| 124 | } |
| 125 | |
| 126 | func (r *Renderer) Results(data []View) { |
| 127 | if len(data) == 0 { |
no test coverage detected