Method
writeJSON
(data any, opts ...ResponseOption)
Source from the content-addressed store, hash-verified
| 101 | switch format { |
| 102 | case FormatQuiet: |
| 103 | return w.writeQuiet(data) |
| 104 | case FormatIDs: |
| 105 | return w.writeIDs(data) |
| 106 | case FormatCount: |
| 107 | return w.writeCount(data) |
| 108 | case FormatMarkdown: |
| 109 | return w.writeMarkdown(data) |
| 110 | case FormatHTML: |
| 111 | return apierr.ErrUsage("--html is not supported by this output") |
| 112 | default: |
| 113 | return w.writeJSON(data, opts...) |
| 114 | } |
| 115 | } |
Tested by
no test coverage detected