Commit 9ccbd027 authored by Mikio Hara's avatar Mikio Hara

cmd/go: make use of Runnable method

Reported via unsupported Github pull request: #9299

Change-Id: I0e98dd68cbc68fcc6bcec15c5b33f20b6a861ec6
Reviewed-on: https://go-review.googlesource.com/3025Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 95864504
...@@ -153,7 +153,7 @@ func main() { ...@@ -153,7 +153,7 @@ func main() {
} }
for _, cmd := range commands { for _, cmd := range commands {
if cmd.Name() == args[0] && cmd.Run != nil { if cmd.Name() == args[0] && cmd.Runnable() {
cmd.Flag.Usage = func() { cmd.Usage() } cmd.Flag.Usage = func() { cmd.Usage() }
if cmd.CustomFlags { if cmd.CustomFlags {
args = args[1:] args = args[1:]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment