Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b5d9141

Browse files
author
Jess Frazelle
committed
Merge pull request moby#16674 from coolljt0725/use_consistent_command_description
Use consistent command description
2 parents 80469f8 + 2b0927c commit b5d9141

44 files changed

Lines changed: 122 additions & 94 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

api/client/attach.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
//
1818
// Usage: docker attach [OPTIONS] CONTAINER
1919
func (cli *DockerCli) CmdAttach(args ...string) error {
20-
cmd := Cli.Subcmd("attach", []string{"CONTAINER"}, "Attach to a running container", true)
20+
cmd := Cli.Subcmd("attach", []string{"CONTAINER"}, Cli.DockerCommands["attach"].Description, true)
2121
noStdin := cmd.Bool([]string{"#nostdin", "-no-stdin"}, false, "Do not attach STDIN")
2222
proxy := cmd.Bool([]string{"#sig-proxy", "-sig-proxy"}, true, "Proxy all received signals to the process")
2323

api/client/build.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const (
4848
//
4949
// Usage: docker build [OPTIONS] PATH | URL | -
5050
func (cli *DockerCli) CmdBuild(args ...string) error {
51-
cmd := Cli.Subcmd("build", []string{"PATH | URL | -"}, "Build a new image from the source code at PATH", true)
51+
cmd := Cli.Subcmd("build", []string{"PATH | URL | -"}, Cli.DockerCommands["build"].Description, true)
5252
tag := cmd.String([]string{"t", "-tag"}, "", "Repository name (and optionally a tag) for the image")
5353
suppressOutput := cmd.Bool([]string{"q", "-quiet"}, false, "Suppress the verbose output generated by the containers")
5454
noCache := cmd.Bool([]string{"#no-cache", "-no-cache"}, false, "Do not use cache when building the image")

api/client/commit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
//
1919
// Usage: docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
2020
func (cli *DockerCli) CmdCommit(args ...string) error {
21-
cmd := Cli.Subcmd("commit", []string{"CONTAINER [REPOSITORY[:TAG]]"}, "Create a new image from a container's changes", true)
21+
cmd := Cli.Subcmd("commit", []string{"CONTAINER [REPOSITORY[:TAG]]"}, Cli.DockerCommands["commit"].Description, true)
2222
flPause := cmd.Bool([]string{"p", "-pause"}, true, "Pause container during commit")
2323
flComment := cmd.String([]string{"m", "-message"}, "", "Commit message")
2424
flAuthor := cmd.String([]string{"a", "#author", "-author"}, "", "Author (e.g., \"John Hannibal Smith <[email protected]>\")")

api/client/cp.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ func (cli *DockerCli) CmdCp(args ...string) error {
4343
"cp",
4444
[]string{"CONTAINER:PATH LOCALPATH|-", "LOCALPATH|- CONTAINER:PATH"},
4545
strings.Join([]string{
46-
"Copy files/folders between a container and your host.\n",
47-
"Use '-' as the source to read a tar archive from stdin\n",
46+
Cli.DockerCommands["cp"].Description,
47+
"\nUse '-' as the source to read a tar archive from stdin\n",
4848
"and extract it to a directory destination in a container.\n",
4949
"Use '-' as the destination to stream a tar archive of a\n",
5050
"container source to stdout.",

api/client/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ func (cli *DockerCli) createContainer(config *runconfig.Config, hostConfig *runc
159159
//
160160
// Usage: docker create [OPTIONS] IMAGE [COMMAND] [ARG...]
161161
func (cli *DockerCli) CmdCreate(args ...string) error {
162-
cmd := Cli.Subcmd("create", []string{"IMAGE [COMMAND] [ARG...]"}, "Create a new container", true)
162+
cmd := Cli.Subcmd("create", []string{"IMAGE [COMMAND] [ARG...]"}, Cli.DockerCommands["create"].Description, true)
163163
addTrustedFlags(cmd, true)
164164

165165
// These are flags not stored in Config/HostConfig

api/client/diff.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
//
1919
// Usage: docker diff CONTAINER
2020
func (cli *DockerCli) CmdDiff(args ...string) error {
21-
cmd := Cli.Subcmd("diff", []string{"CONTAINER"}, "Inspect changes on a container's filesystem", true)
21+
cmd := Cli.Subcmd("diff", []string{"CONTAINER"}, Cli.DockerCommands["diff"].Description, true)
2222
cmd.Require(flag.Exact, 1)
2323

2424
cmd.ParseFlags(args, true)

api/client/events.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
//
1616
// Usage: docker events [OPTIONS]
1717
func (cli *DockerCli) CmdEvents(args ...string) error {
18-
cmd := Cli.Subcmd("events", nil, "Get real time events from the server", true)
18+
cmd := Cli.Subcmd("events", nil, Cli.DockerCommands["events"].Description, true)
1919
since := cmd.String([]string{"#since", "-since"}, "", "Show all events created since timestamp")
2020
until := cmd.String([]string{"-until"}, "", "Stream events until this timestamp")
2121
flFilter := opts.NewListOpts(nil)

api/client/exec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
//
1717
// Usage: docker exec [OPTIONS] CONTAINER COMMAND [ARG...]
1818
func (cli *DockerCli) CmdExec(args ...string) error {
19-
cmd := Cli.Subcmd("exec", []string{"CONTAINER COMMAND [ARG...]"}, "Run a command in a running container", true)
19+
cmd := Cli.Subcmd("exec", []string{"CONTAINER COMMAND [ARG...]"}, Cli.DockerCommands["exec"].Description, true)
2020

2121
execConfig, err := runconfig.ParseExec(cmd, args)
2222
// just in case the ParseExec does not exit

api/client/export.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
//
1515
// Usage: docker export [OPTIONS] CONTAINER
1616
func (cli *DockerCli) CmdExport(args ...string) error {
17-
cmd := Cli.Subcmd("export", []string{"CONTAINER"}, "Export the contents of a container's filesystem as a tar archive", true)
17+
cmd := Cli.Subcmd("export", []string{"CONTAINER"}, Cli.DockerCommands["export"].Description, true)
1818
outfile := cmd.String([]string{"o", "-output"}, "", "Write to a file, instead of STDOUT")
1919
cmd.Require(flag.Exact, 1)
2020

api/client/history.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
//
2020
// Usage: docker history [OPTIONS] IMAGE
2121
func (cli *DockerCli) CmdHistory(args ...string) error {
22-
cmd := Cli.Subcmd("history", []string{"IMAGE"}, "Show the history of an image", true)
22+
cmd := Cli.Subcmd("history", []string{"IMAGE"}, Cli.DockerCommands["history"].Description, true)
2323
human := cmd.Bool([]string{"H", "-human"}, true, "Print sizes and dates in human readable format")
2424
quiet := cmd.Bool([]string{"q", "-quiet"}, false, "Only show numeric IDs")
2525
noTrunc := cmd.Bool([]string{"#notrunc", "-no-trunc"}, false, "Don't truncate output")

0 commit comments

Comments
 (0)