MCPcopy Create free account
hub / github.com/cli/cli / writeJSONL

Function writeJSONL

script/ghmock/store.go:239–247  ·  view source on GitHub ↗
(w io.Writer, items []T)

Source from the content-addressed store, hash-verified

237}
238
239func writeJSONL[T any](w io.Writer, items []T) error {
240 enc := json.NewEncoder(w)
241 for _, item := range items {
242 if err := enc.Encode(item); err != nil {
243 return err
244 }
245 }
246 return nil
247}
248
249// readJSONL reads a file of JSON objects, one per line. A missing file has
250// none.

Callers 2

writeExportDirFunction · 0.85
appendJSONLFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected