-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CSV output support to some aggregators #94
Conversation
✅ Deploy Preview for raredocs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #94 +/- ##
==========================================
- Coverage 89.91% 89.60% -0.32%
==========================================
Files 104 107 +3
Lines 5305 5425 +120
==========================================
+ Hits 4770 4861 +91
- Misses 410 429 +19
- Partials 125 135 +10
|
pkg/csv/aggWriters.go
Outdated
cols := agg.OrderedColumns(sorting.NVNameSorter) | ||
w.Write(append([]string{""}, cols...)) | ||
for _, row := range agg.OrderedRows(sorting.NVNameSorter) { | ||
arr := make([]string, len(cols)+1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could save memory here by make once
pkg/csv/aggWriters.go
Outdated
} | ||
|
||
for _, group := range aggr.Groups(sorting.ByName) { | ||
row := make([]string, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we know capacity here?
pkg/csv/aggWriters.go
Outdated
w.Write(header) | ||
|
||
for _, item := range aggr.ItemsSorted(sorting.NVNameSorter) { | ||
row := []any{item.Name} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
save memory with cap hint
Add CSV output support to various aggregators. Can output to file or stdout