aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2011-03-25 11:28:31 -0700
committerRob Pike <r@golang.org>2011-03-25 11:28:31 -0700
commit9db2bc741e87571a9a3d31b1d1f3d6b9cda0fac4 (patch)
tree1cc3dbcb633aaf1de23d97226f2a15efd859352d
parent071d212a22a027510d35d929be1e4e3da85558c9 (diff)
downloadgo-9db2bc741e87571a9a3d31b1d1f3d6b9cda0fac4.tar.gz
go-9db2bc741e87571a9a3d31b1d1f3d6b9cda0fac4.zip
flag: fix error in documentation example.
Fixes #1615. This time for sure. R=rsc, gri CC=golang-dev https://golang.org/cl/4275079
-rw-r--r--src/pkg/flag/flag.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/flag/flag.go b/src/pkg/flag/flag.go
index 14f4d522c6..19a3104553 100644
--- a/src/pkg/flag/flag.go
+++ b/src/pkg/flag/flag.go
@@ -56,7 +56,7 @@
flag.Bool(...) // global options
flag.Parse() // parse leading command
- subcmd := flag.Arg[0]
+ subcmd := flag.Arg(0)
switch subcmd {
// add per-subcommand options
}