(v any, indent string)
| 68 | } |
| 69 | |
| 70 | func (c *jsonOutput) jsonIndentedBytes(v any, indent string) []byte { |
| 71 | v = c.cleanupForJSON(v) |
| 72 | |
| 73 | var ( |
| 74 | b []byte |
| 75 | err error |
| 76 | ) |
| 77 | |
| 78 | if c.jsonIndent { |
| 79 | b, err = json.MarshalIndent(v, indent+"", indent+" ") |
| 80 | } else { |
| 81 | b, err = json.Marshal(v) |
| 82 | } |
| 83 | |
| 84 | impossible.PanicOnError(err) |
| 85 | |
| 86 | return b |
| 87 | } |
| 88 | |
| 89 | type jsonList struct { |
| 90 | separator string |
no test coverage detected