From 19aecba1d5ae30411ddb1bc885da33d12d2eafd8 Mon Sep 17 00:00:00 2001 From: Fazlul Shahriar Date: Sun, 20 Mar 2011 11:45:43 -0700 Subject: [PATCH] flag: document Nflag function R=golang-dev, r CC=golang-dev https://golang.org/cl/4279065 --- src/pkg/flag/flag.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pkg/flag/flag.go b/src/pkg/flag/flag.go index 4e57e0f099..14f4d522c6 100644 --- a/src/pkg/flag/flag.go +++ b/src/pkg/flag/flag.go @@ -289,6 +289,7 @@ func failf(format string, a ...interface{}) { os.Exit(2) } +// NFlag returns the number of flags that have been set. func NFlag() int { return len(flags.actual) } // Arg returns the i'th command-line argument. Arg(0) is the first remaining argument