-
Notifications
You must be signed in to change notification settings - Fork 38
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
cli/container: Pretty-print creation timestamp in list-objects
output
#2653
Conversation
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.
Think CHANGELOG would be appreciated.
It's somewhat dangerous in that it's hard to separate real attribute value from its representation. I'd say we need some |
Previously, `container list-object` command with `--with-attr` flag printed objects' attributes in raw way. In particular, creation timestamp was showed in Unix format (e.g. 1692609422). While this format is widely known, its human-unreadable. To facilitate the user's experience, the output should be supplemented with a readable format similar to the `object head` command. Use Go `time.Time` stringer and print the result along with Unix time value. From: ``` HKupeALCqk3VUSmuRXTGdJt6ZZQoJsJ3VtNVV8Pu1Xjd Timestamp=1692609422 ``` to: ``` HKupeALCqk3VUSmuRXTGdJt6ZZQoJsJ3VtNVV8Pu1Xjd Timestamp=1692609422 (2023-08-21 11:17:02 +0200 CEST) ``` Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
471d7f5
to
7053d05
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2653 +/- ##
=======================================
Coverage 30.62% 30.62%
=======================================
Files 406 406
Lines 30070 30070
=======================================
Hits 9208 9208
Misses 20085 20085
Partials 777 777 ☔ View full report in Codecov by Sentry. |
didnt got ur point why do we need |
oh, i guess u talk about value collisions. Dont think it's a problem for timestamps in practice. More flags is usage complication imo, so i suggest to leave it like this cuz nobody hurts |
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.
Given that we're already doing it for object head
, OK.
Previously,
container list-object
command with--with-attr
flag printed objects' attributes in raw way. In particular, creation timestamp was showed in Unix format (e.g. 1692609422). While this format is widely known, its human-unreadable. To facilitate the user's experience, the output should be supplemented with a readable format similar to theobject head
command.Use Go
time.Time
stringer and print the result along with Unix time value. From:to: