mirror of
https://github.com/golang/go
synced 2024-11-18 08:14:41 -07:00
cmd/digraph: print usage on -h
Also switch usage printing to using stderr always, as is common for Go tools. Change-Id: I240da4344fe6b51a418c0d4b0b7d7e7d5614c1d7 Reviewed-on: https://go-review.googlesource.com/129776 Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
parent
7395529d16
commit
44ec670fe7
@ -89,11 +89,12 @@ Example usage:
|
||||
`
|
||||
|
||||
func main() {
|
||||
flag.Usage = func() { fmt.Fprintln(os.Stderr, Usage) }
|
||||
flag.Parse()
|
||||
|
||||
args := flag.Args()
|
||||
if len(args) == 0 {
|
||||
fmt.Println(Usage)
|
||||
fmt.Fprintln(os.Stderr, Usage)
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user