Closed Cdaprod closed 10 months ago
@Cdaprod
Error: cmd/stat_test.go:43:2: expected operand, found '}'
Error: make: *** [Makefile:33: vet] Error 1
Error: Process completed with exit code 2.
I am adding bubbletea to the mc stat.go to give it a more appealing output.
Please resubmit when its ready @Cdaprod
Community Contribution License
All community contributions in this pull request are licensed to the project maintainers under the terms of the [Apache 2 license] (https://www.apache.org/licenses/LICENSE-2.0). By creating this pull request I represent that I have the right to license the contributions to the project maintainers under the Apache 2 license.
Description
This PR introduces enhancements to stat.go in the MinIO mc tool, implementing humanized formatting for object counts in the mc stat command output. By adopting comma-separated values, this update significantly improves the readability of large numbers.
Furthermore, the stat_test.go file has been augmented to include comprehensive tests for these new formatting features. These tests rigorously verify that the humanized output adheres to the expected format across a range of scenarios.
Changes Summary
stat.go
: Modified to apply humanized formatting usinghumanize.Comma
.stat_test.go
: Added new test cases and assertions to validate the humanized output.These changes aim to enhance the readability of the
mc stat
command output, particularly when dealing with large object counts.Motivation and Context
When dealing with large object counts, it's easier for users to read and understand the numbers when they're formatted with commas. This change enhances the user experience by making the output of
mc stat
more accessible, especially when presenting large datasets.How to test this PR?
mc stat
command with various bucket sizes to ensure the output is formatted correctly.Manual Testing of mc stat
Automated Testing
The tests should cover various scenarios and check if the humanized output is as expected for different object sizes. These tests ensure that both the new functionality and existing features of the mc stat command work as intended.
Types of changes
Checklist:
commit-id
orPR #
here)