]> Cypherpunks repositories - gostls13.git/commitdiff
flag: fix example in doc comment.
authorRob Pike <r@golang.org>
Thu, 17 Mar 2011 22:29:52 +0000 (15:29 -0700)
committerRob Pike <r@golang.org>
Thu, 17 Mar 2011 22:29:52 +0000 (15:29 -0700)
Fixes #1615.

R=dsymonds
CC=golang-dev
https://golang.org/cl/4277058

src/pkg/flag/flag.go

index 6c9f3a8407e2fda9097c0638e0b0927fc960cf4c..4e57e0f09924c0a98583bfa2c541b52058f3aa49 100644 (file)
@@ -56,7 +56,7 @@
 
                flag.Bool(...)  // global options
                flag.Parse()  // parse leading command
-               subcmd := flag.Args(0)
+               subcmd := flag.Arg[0]
                switch subcmd {
                        // add per-subcommand options
                }