MCPcopy Index your code
hub / github.com/github/github-mcp-server / csvRowsFromArray

Function csvRowsFromArray

pkg/github/csv_output.go:241–259  ·  view source on GitHub ↗
(values []any)

Source from the content-addressed store, hash-verified

239}
240
241func csvRowsFromArray(values []any) []map[string]string {
242 if len(values) == 0 {
243 return nil
244 }
245
246 rows := make([]map[string]string, 0, len(values))
247 for _, value := range values {
248 var row map[string]string
249 switch v := value.(type) {
250 case map[string]any:
251 row = make(map[string]string)
252 appendFlattenedCSVFields(row, v, "")
253 default:
254 row = scalarCSVRow(v)
255 }
256 rows = append(rows, row)
257 }
258 return rows
259}
260
261func writeCSVMetadata(buf *bytes.Buffer, metadata map[string]string) {
262 if len(metadata) == 0 {

Callers 1

csvDocumentFunction · 0.85

Calls 2

appendFlattenedCSVFieldsFunction · 0.85
scalarCSVRowFunction · 0.85

Tested by

no test coverage detected