From 9db2bc741e87571a9a3d31b1d1f3d6b9cda0fac4 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Fri, 25 Mar 2011 11:28:31 -0700 Subject: [PATCH] flag: fix error in documentation example. Fixes #1615. This time for sure. R=rsc, gri CC=golang-dev https://golang.org/cl/4275079 --- src/pkg/flag/flag.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }