mirror of
https://github.com/golang/go
synced 2024-11-02 15:37:45 +00:00
cmd/go: make use of Runnable method
Reported via unsupported Github pull request: #9299 Change-Id: I0e98dd68cbc68fcc6bcec15c5b33f20b6a861ec6 Reviewed-on: https://go-review.googlesource.com/3025 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
95864504d2
commit
9ccbd027dd
1 changed files with 1 additions and 1 deletions
|
@ -153,7 +153,7 @@ func main() {
|
|||
}
|
||||
|
||||
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() }
|
||||
if cmd.CustomFlags {
|
||||
args = args[1:]
|
||||
|
|
Loading…
Reference in a new issue