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

Function csvHeaders

pkg/github/csv_output.go:302–316  ·  view source on GitHub ↗
(rows []map[string]string)

Source from the content-addressed store, hash-verified

300}
301
302func csvHeaders(rows []map[string]string) []string {
303 headerSet := make(map[string]struct{})
304 for _, row := range rows {
305 for header := range row {
306 headerSet[header] = struct{}{}
307 }
308 }
309
310 headers := make([]string, 0, len(headerSet))
311 for header := range headerSet {
312 headers = append(headers, header)
313 }
314 sort.Strings(headers)
315 return headers
316}
317
318func csvColumnName(prefix, key string) string {
319 if prefix == "" {

Callers 1

jsonTextToCSVFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected