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

Function primaryRowsOneLevelDown

pkg/github/csv_output.go:194–216  ·  view source on GitHub ↗
(value map[string]any)

Source from the content-addressed store, hash-verified

192}
193
194func primaryRowsOneLevelDown(value map[string]any) ([]any, []string, bool) {
195 var matchedRows []any
196 var matchedPath []string
197 for key, raw := range value {
198 child, ok := raw.(map[string]any)
199 if !ok {
200 continue
201 }
202 rows, path, ok := primaryRowsAtCurrentLevel(child)
203 if !ok {
204 continue
205 }
206 if matchedPath != nil {
207 return nil, nil, false
208 }
209 matchedRows = rows
210 matchedPath = append([]string{key}, path...)
211 }
212 if matchedPath == nil {
213 return nil, nil, false
214 }
215 return matchedRows, matchedPath, true
216}
217
218func metadataWithoutPath(value map[string]any, path []string) map[string]any {
219 metadata := make(map[string]any, len(value))

Callers 1

primaryRowsFromMapFunction · 0.85

Calls 1

Tested by

no test coverage detected