MCPcopy
hub / github.com/cli/cli / Close

Method Close

pkg/cmd/api/pagination.go:193–208  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

191}
192
193func (w *jsonArrayWriter) Close() error {
194 var delims string
195 if w.started {
196 delims = "]"
197 } else {
198 delims = "[]"
199 }
200
201 w.started = false
202 if w.color {
203 return jsoncolor.WriteDelims(w, delims, ttyIndent)
204 }
205
206 _, err := w.Writer.Write([]byte(delims))
207 return err
208}
209
210func startPage(w io.Writer) error {
211 if jaw, ok := w.(*jsonArrayWriter); ok {

Callers 3

apiRunFunction · 0.95
TestJsonArrayWriterFunction · 0.95
TestJsonArrayWriter_CopyFunction · 0.95

Calls 2

WriteDelimsFunction · 0.92
WriteMethod · 0.65

Tested by 2

TestJsonArrayWriterFunction · 0.76
TestJsonArrayWriter_CopyFunction · 0.76