Skip to content

Commit

Permalink
cmd/gomote: use appropriate command names in usage text
Browse files Browse the repository at this point in the history
The commands list and ssh had correct command names in usage text.
However, it seems the usage of create command was copied/pasted for
many other commands, and never got updated. This change fixes that.

Change-Id: I8392029c5c129bbee027c522a6e2bbfdecd07c62
Reviewed-on: https://go-review.googlesource.com/c/141687
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  • Loading branch information
dmitshur committed Oct 14, 2018
1 parent a5d3073 commit c27f283
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion cmd/gomote/destroy.go
Expand Up @@ -13,7 +13,7 @@ import (
func destroy(args []string) error {
fs := flag.NewFlagSet("destroy", flag.ContinueOnError)
fs.Usage = func() {
fmt.Fprintln(os.Stderr, "create usage: gomote destroy <instance>")
fmt.Fprintln(os.Stderr, "destroy usage: gomote destroy <instance>")
fs.PrintDefaults()
os.Exit(1)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/gomote/get.go
Expand Up @@ -16,7 +16,7 @@ import (
func getTar(args []string) error {
fs := flag.NewFlagSet("get", flag.ContinueOnError)
fs.Usage = func() {
fmt.Fprintln(os.Stderr, "create usage: gomote gettar [get-opts] <buildlet-name>")
fmt.Fprintln(os.Stderr, "gettar usage: gomote gettar [get-opts] <buildlet-name>")
fs.PrintDefaults()
os.Exit(1)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/gomote/gomote.go
Expand Up @@ -45,7 +45,7 @@ To list all the builder types available, run "create" with no arguments:
The "gomote run" command has many of its own flags:
$ gomote run -h
create usage: gomote run [run-opts] <instance> <cmd> [args...]
run usage: gomote run [run-opts] <instance> <cmd> [args...]
-builderenv string
Optional alternate builder to act like. Must share the same
underlying buildlet host type, or it's an error. For
Expand Down
2 changes: 1 addition & 1 deletion cmd/gomote/ls.go
Expand Up @@ -16,7 +16,7 @@ import (
func ls(args []string) error {
fs := flag.NewFlagSet("ls", flag.ContinueOnError)
fs.Usage = func() {
fmt.Fprintln(os.Stderr, "create usage: gomote ls <instance> [-R] [dir]")
fmt.Fprintln(os.Stderr, "ls usage: gomote ls <instance> [-R] [dir]")
fs.PrintDefaults()
os.Exit(1)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/gomote/ping.go
Expand Up @@ -13,7 +13,7 @@ import (
func ping(args []string) error {
fs := flag.NewFlagSet("ping", flag.ContinueOnError)
fs.Usage = func() {
fmt.Fprintln(os.Stderr, "create usage: gomote ping <instance>")
fmt.Fprintln(os.Stderr, "ping usage: gomote ping <instance>")
fs.PrintDefaults()
os.Exit(1)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/gomote/push.go
Expand Up @@ -29,7 +29,7 @@ func push(args []string) error {
var dryRun bool
fs.BoolVar(&dryRun, "dry-run", false, "print what would be done only")
fs.Usage = func() {
fmt.Fprintln(os.Stderr, "create usage: gomote push <instance>")
fmt.Fprintln(os.Stderr, "push usage: gomote push <instance>")
fs.PrintDefaults()
os.Exit(1)
}
Expand Down
6 changes: 3 additions & 3 deletions cmd/gomote/put.go
Expand Up @@ -22,7 +22,7 @@ import (
func putTar(args []string) error {
fs := flag.NewFlagSet("put", flag.ContinueOnError)
fs.Usage = func() {
fmt.Fprintln(os.Stderr, "create usage: gomote puttar [put-opts] <buildlet-name> [tar.gz file or '-' for stdin]")
fmt.Fprintln(os.Stderr, "puttar usage: gomote puttar [put-opts] <buildlet-name> [tar.gz file or '-' for stdin]")
fs.PrintDefaults()
os.Exit(1)
}
Expand Down Expand Up @@ -90,7 +90,7 @@ func putTar(args []string) error {
func put14(args []string) error {
fs := flag.NewFlagSet("put14", flag.ContinueOnError)
fs.Usage = func() {
fmt.Fprintln(os.Stderr, "create usage: gomote put14 <buildlet-name>")
fmt.Fprintln(os.Stderr, "put14 usage: gomote put14 <buildlet-name>")
fs.PrintDefaults()
os.Exit(1)
}
Expand All @@ -115,7 +115,7 @@ func put14(args []string) error {
func put(args []string) error {
fs := flag.NewFlagSet("put", flag.ContinueOnError)
fs.Usage = func() {
fmt.Fprintln(os.Stderr, "create usage: gomote put [put-opts] <buildlet-name> <source or '-' for stdin> [destination]")
fmt.Fprintln(os.Stderr, "put usage: gomote put [put-opts] <buildlet-name> <source or '-' for stdin> [destination]")
fs.PrintDefaults()
os.Exit(1)
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/gomote/rm.go
Expand Up @@ -13,8 +13,8 @@ import (
func rm(args []string) error {
fs := flag.NewFlagSet("rm", flag.ContinueOnError)
fs.Usage = func() {
fmt.Fprintln(os.Stderr, "create usage: gomote rm <instance> <file-or-dir>+")
fmt.Fprintln(os.Stderr, " gomote rm <instance> . (to delete everything)")
fmt.Fprintln(os.Stderr, "rm usage: gomote rm <instance> <file-or-dir>+")
fmt.Fprintln(os.Stderr, " gomote rm <instance> . (to delete everything)")
fs.PrintDefaults()
os.Exit(1)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/gomote/run.go
Expand Up @@ -18,7 +18,7 @@ import (
func run(args []string) error {
fs := flag.NewFlagSet("run", flag.ContinueOnError)
fs.Usage = func() {
fmt.Fprintln(os.Stderr, "create usage: gomote run [run-opts] <instance> <cmd> [args...]")
fmt.Fprintln(os.Stderr, "run usage: gomote run [run-opts] <instance> <cmd> [args...]")
fs.PrintDefaults()
os.Exit(1)
}
Expand Down

0 comments on commit c27f283

Please sign in to comment.