checkpoint-restore / checkpointctl

A tool for in-depth analysis of container checkpoints
Apache License 2.0
87 stars 15 forks source link

show: enable shorthand options #66

Closed rst0git closed 1 year ago

rst0git commented 1 year ago

This patch enables the following shorthand options:

Usage:
  checkpointctl show [flags]

Flags:
  -A, --all          Display all additional information about the checkpoints
  -F, --full-paths   Display mounts with full paths
  -h, --help         help for show
  -m, --mounts       Print overview about mounts used in the checkpoints
  -s, --stats        Print checkpointing statistics if available
codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.19 :tada:

Comparison is base (0405c79) 80.56% compared to head (b52f036) 80.75%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #66 +/- ## ========================================== + Coverage 80.56% 80.75% +0.19% ========================================== Files 3 3 Lines 391 395 +4 ========================================== + Hits 315 319 +4 Misses 55 55 Partials 21 21 ``` | [Impacted Files](https://app.codecov.io/gh/checkpoint-restore/checkpointctl/pull/66?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [checkpointctl.go](https://app.codecov.io/gh/checkpoint-restore/checkpointctl/pull/66?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-Y2hlY2twb2ludGN0bC5nbw==) | `84.84% <100.00%> (+0.63%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

github-actions[bot] commented 1 year ago

Test Results

23 tests  ±0   23 :heavy_check_mark: ±0   0s :stopwatch: ±0s   1 suites ±0     0 :zzz: ±0    1 files   ±0     0 :x: ±0 

Results for commit b52f0360. ± Comparison against base commit 0405c795.

:recycle: This comment has been updated with latest results.

snprajwal commented 1 year ago

Wouldn't some of these shorthands conflict with future additions? E.g. -f for --full-paths could be mistaken for --fds.

rst0git commented 1 year ago

Wouldn't some of these shorthands conflict with future additions? E.g. -f for --full-paths could be mistaken for --fds.

Good question. I expect there will be similar conflicts with future additions. Should use -A and -F (capitals) for --all and --full-paths? Then, -f (lowercase) could be used as a shorthand for --fds.

snprajwal commented 1 year ago

That would work nicely!

adrianreber commented 1 year ago

I understand the reason for this PR, but I am still a bit undecided. Maybe we should wait a bit longer until we have more features before introducing shorthand options. Once we have more flags, maybe we can see better how to distribute the shorthand flags. Just an idea.

rst0git commented 1 year ago

Closing this PR in favour of the changes introduced with https://github.com/checkpoint-restore/checkpointctl/pull/76