Add CSV output format with FormatCSV and ToCSVRecords#31
Closed
sospeter-57 wants to merge 1 commit into
Closed
Conversation
Author
|
just checking out in case you've been too busy to review my PR |
Collaborator
|
Thanks for the nudge @sospeter-57 , I'll take a look today |
maksimov
requested changes
May 4, 2026
Collaborator
There was a problem hiding this comment.
Looks like there's an index out of range there:
panic: runtime error: index out of range [0] with length 0
goroutine 1 [running]:
github.com/gpuaudit/cli/internal/output.ToCSVRecords(0x0?)
/Users/smaksimov/Work/gpuaudit/cli/internal/output/csv.go:66 +0x9af
github.com/gpuaudit/cli/internal/output.FormatCSV({0x499f600, 0xc00018e040?}, 0xc0001600f0)
/Users/smaksimov/Work/gpuaudit/cli/internal/output/csv.go:18 +0xfc
main.runScan(0xc000254300?, {0x44268ca?, 0x4?, 0x442685e?})
/Users/smaksimov/Work/gpuaudit/cli/cmd/gpuaudit/main.go:195 +0x74c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds CSV as an output format option. Implements FormatCSV for formatting output and ToCSVRecords as a helper for converting data to CSV records. Includes unit tests.