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

Function metadataWithoutPath

pkg/github/csv_output.go:218–239  ·  view source on GitHub ↗
(value map[string]any, path []string)

Source from the content-addressed store, hash-verified

216}
217
218func metadataWithoutPath(value map[string]any, path []string) map[string]any {
219 metadata := make(map[string]any, len(value))
220 for key, raw := range value {
221 if key != path[0] {
222 metadata[key] = raw
223 continue
224 }
225
226 if len(path) == 1 {
227 continue
228 }
229 child, ok := raw.(map[string]any)
230 if !ok {
231 continue
232 }
233 childMetadata := metadataWithoutPath(child, path[1:])
234 if len(childMetadata) > 0 {
235 metadata[key] = childMetadata
236 }
237 }
238 return metadata
239}
240
241func csvRowsFromArray(values []any) []map[string]string {
242 if len(values) == 0 {

Callers 1

primaryRowsFromMapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected