mirror of https://github.com/golang/go.git
fix duration flag help
This commit is contained in:
parent
f0ff6c502a
commit
ee4c00c3b1
|
|
@ -25,7 +25,7 @@ func ExampleFlagSet() {
|
||||||
|
|
||||||
stop := func(args []string) {
|
stop := func(args []string) {
|
||||||
fs := flag.NewFlagSet("stop", flag.ContinueOnError)
|
fs := flag.NewFlagSet("stop", flag.ContinueOnError)
|
||||||
timeout := fs.Duration("timeout", time.Second, "stop timeout in `seconds`")
|
timeout := fs.Duration("timeout", time.Second, "stop timeout duration (e.g. `3s`)")
|
||||||
if err := fs.Parse(args); err != nil {
|
if err := fs.Parse(args); err != nil {
|
||||||
fmt.Printf("error: %s", err)
|
fmt.Printf("error: %s", err)
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue