+
Skip to content

Conversation

vbvictor
Copy link
Owner

This commit introduces the ability to output the report command results in CSV format.

The following changes were made:

  • Added a PrintCSV function to the report package that handles the CSV formatting logic.
  • Modified the report command to accept an outputFormat flag, allowing users to specify the desired output format (tabular or CSV).
  • Updated the printReport function to use the PrintCSV function when the outputFormat is set to "csv".
  • Added a test case for the CSV output to pkg/report/print_test.go

This enhancement provides users with a more flexible way to consume the report data, enabling easier integration with other tools and systems.

This commit introduces the ability to output the report command results in CSV format.

The following changes were made:

- Added a `PrintCSV` function to the `report` package that handles the CSV formatting logic.
- Modified the `report` command to accept an `outputFormat` flag, allowing users to specify the desired output format (tabular or CSV).
- Updated the `printReport` function to use the `PrintCSV` function when the `outputFormat` is set to "csv".
- Added a test case for the CSV output to `pkg/report/print_test.go`

This enhancement provides users with a more flexible way to consume the report data, enabling easier integration with other tools and systems.
@vbvictor vbvictor merged commit 99e0ca5 into main Mar 22, 2025
2 checks passed
@vbvictor vbvictor deleted the report-csv-output branch March 22, 2025 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载