Skip to content
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

fix: make command usage more readable in doc #549

Merged

Conversation

allencloud
Copy link
Collaborator

Signed-off-by: Allen Sun [email protected]

1.Describe what this PR did
Issue #541 mentioned that in pouch's cli command usage was not so readable. Originally, there are always a [flags] at the postfix of the usage sentence, like:

Usage:
  pouch create [image] [flags]

With this PR, we add a childCmd.DisableFlagsInUseLine = true to the command to disable flags in useline. With this, usage shows like:

Usage:
  pouch create [OPTIONS] IMAGE [ARG...]

2.Does this pull request fix one issue?
fixes #541

3.Describe how you did it

  • add a childCmd.DisableFlagsInUseLine = true
  • change the usage description of all commands

4.Describe how to verify it

Usage:
  pouch create [OPTIONS] IMAGE [ARG...]

5.Special notes for reviews

NONE

@pouchrobot pouchrobot added areas/cli kind/bug This is bug report for project size/XL labels Jan 10, 2018
@@ -48,7 +48,7 @@ func (suite *PouchStopSuite) TestStopWorks(c *check.C) {

// test stop container with timeout(*seconds)
command.PouchRun("start", name).Assert(c, icmd.Success)
command.PouchRun("stop", name, "3").Assert(c, icmd.Success)
command.PouchRun("stop", "-t", "3", name).Assert(c, icmd.Success)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pr helped me to find a tiny mistake in the test case. Just comment to record this.

@codecov-io
Copy link

Codecov Report

Merging #549 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #549   +/-   ##
=======================================
  Coverage   20.47%   20.47%           
=======================================
  Files          39       39           
  Lines        2056     2056           
=======================================
  Hits          421      421           
  Misses       1590     1590           
  Partials       45       45

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c886ee7...92c94a9. Read the comment docs.

@Letty5411
Copy link
Contributor

LGTM

@Letty5411 Letty5411 merged commit 29a6d4c into AliyunContainerService:master Jan 11, 2018
@allencloud allencloud deleted the command-readable branch January 11, 2018 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
areas/cli kind/bug This is bug report for project size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] usage of pouch CMD should be polished
4 participants