MCPcopy
hub / github.com/moonD4rk/HackBrowserData / aggregate

Method aggregate

output/output.go:120–132  ·  view source on GitHub ↗

aggregate merges all results into row slices grouped by category, returning only non-empty categories.

()

Source from the content-addressed store, hash-verified

118// aggregate merges all results into row slices grouped by category,
119// returning only non-empty categories.
120func (o *Writer) aggregate() []categoryRows {
121 var s []categoryRows
122 for _, cat := range categories {
123 var rows []row
124 for _, r := range o.results {
125 rows = append(rows, cat.extract(r)...)
126 }
127 if len(rows) > 0 {
128 s = append(s, categoryRows{cat.name, rows})
129 }
130 }
131 return s
132}
133
134func (o *Writer) writeFile(category string, rows []row) (err error) {
135 // Format to buffer first — if formatter produces no output (e.g.

Callers 1

WriteMethod · 0.95

Calls 1

extractMethod · 0.65

Tested by

no test coverage detected