NewJSONInspector generates a new inspector with a compact representation of elements.
(out io.Writer)
| 174 | // NewJSONInspector generates a new inspector with a compact representation |
| 175 | // of elements. |
| 176 | func NewJSONInspector(out io.Writer) Inspector { |
| 177 | if out == nil { |
| 178 | out = io.Discard |
| 179 | } |
| 180 | return &jsonInspector{ |
| 181 | out: out, |
| 182 | raw: json.Compact, |
| 183 | el: json.Marshal, |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | type jsonInspector struct { |
| 188 | out io.Writer |
no outgoing calls
no test coverage detected
searching dependent graphs…