diff options
author | yuz <re.yuz77777@gmail.com> | 2020-03-01 21:35:56 +0900 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2020-03-03 04:56:11 +0000 |
commit | 5b15941c61f478b8ed08b76a27186527ba73d273 (patch) | |
tree | c92cf576595f7c258498723eb723f47e8bf25a0a /src/flag | |
parent | 972df38445977cc04414c7b6f469e2a8e5a63861 (diff) | |
download | go-5b15941c61f478b8ed08b76a27186527ba73d273.tar.gz go-5b15941c61f478b8ed08b76a27186527ba73d273.zip |
flag: changed flag variable name in package doc, for clarity
Changed the flag variable name to nFlag instead of flagname,
because flagname was confusing.
Change-Id: I20dd4c4b4f605395d427a125ba4fd14580e5d766
Reviewed-on: https://go-review.googlesource.com/c/go/+/221678
Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'src/flag')
-rw-r--r-- | src/flag/flag.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/flag/flag.go b/src/flag/flag.go index abf20b6240..eb88c1faa8 100644 --- a/src/flag/flag.go +++ b/src/flag/flag.go @@ -9,9 +9,9 @@ Define flags using flag.String(), Bool(), Int(), etc. - This declares an integer flag, -flagname, stored in the pointer ip, with type *int. + This declares an integer flag, -n, stored in the pointer nFlag, with type *int: import "flag" - var ip = flag.Int("flagname", 1234, "help message for flagname") + var nFlag = flag.Int("n", 1234, "help message for flag n") If you like, you can bind the flag to a variable using the Var() functions. var flagvar int func init() { |