aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schneider <[email protected]>2019-06-16 12:13:26 +0200
committerDavid Schneider <[email protected]>2019-06-16 12:13:26 +0200
commit4890c259ad841b77288ae1507c4b28d799c35afc (patch)
treefcf91326634443a5179ebfc8bd3341aa6278e29a
parent24fa6976df40757dce6aea913e7b81ade90530e1 (diff)
Fix package doc
Signed-off-by: David Schneider <[email protected]>
-rw-r--r--flag.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/flag.go b/flag.go
index 9beeda8..669c392 100644
--- a/flag.go
+++ b/flag.go
@@ -57,9 +57,9 @@ that give one-letter shorthands for flags. You can use these by appending
var ip = flag.IntP("flagname", "f", 1234, "help message")
var flagvar bool
func init() {
- flag.BoolVarP("boolname", "b", true, "help message")
+ flag.BoolVarP(&flagvar, "boolname", "b", true, "help message")
}
- flag.VarP(&flagVar, "varname", "v", 1234, "help message")
+ flag.VarP(&flagval, "varname", "v", "help message")
Shorthand letters can be used with single dashes on the command line.
Boolean shorthand flags can be combined with other shorthand flags.