From c99454b374ae684d01fb654b41d82c2c2584a38d Mon Sep 17 00:00:00 2001 From: jszwedko Date: Fri, 11 Jul 2014 18:17:30 -0400 Subject: [PATCH] Adding struct field names to examples in README Idiomatic Go --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4621310..59806f4 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ Setting and querying flags is simple. ``` go ... app.Flags = []cli.Flag { - cli.StringFlag{"lang", "english", "language for the greeting"}, + cli.StringFlag{Name: "lang", Value: "english", Usage: "language for the greeting"}, } app.Action = func(c *cli.Context) { name := "someone" @@ -159,7 +159,7 @@ You can set alternate (or short) names for flags by providing a comma-delimited ``` go app.Flags = []cli.Flag { - cli.StringFlag{"lang, l", "english", "language for the greeting"}, + cli.StringFlag{Name: "lang, l", Value: "english", Usage: "language for the greeting"}, } ```