From 1fcda0c12c6b5ae3de65342064ba509eab2f3847 Mon Sep 17 00:00:00 2001 From: yuanxiao Date: Wed, 14 Dec 2016 08:54:58 +0800 Subject: too many arguments Signed-off-by: yuanxiao --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 08ad945..93d6d77 100644 --- a/README.md +++ b/README.md @@ -106,9 +106,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. -- cgit v1.2.3