From 4890c259ad841b77288ae1507c4b28d799c35afc Mon Sep 17 00:00:00 2001 From: David Schneider Date: Sun, 16 Jun 2019 12:13:26 +0200 Subject: [PATCH] Fix package doc Signed-off-by: David Schneider --- flag.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flag.go b/flag.go index 9beeda8e..669c3928 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.