Style cleanups of full API example in README
This commit is contained in:
parent
d5abb165ee
commit
8ea4b523d2
12
README.md
12
README.md
@ -1113,7 +1113,7 @@ func main() {
|
||||
app.Flags = []cli.Flag{
|
||||
&cli.BoolFlag{Name: "fancy"},
|
||||
&cli.BoolFlag{Value: true, Name: "fancier"},
|
||||
&cli.StringFlag{Name: "dance-move, d"},
|
||||
&cli.StringFlag{Name: "dance-move", Aliases: []string{"d"}},
|
||||
}
|
||||
app.EnableBashCompletion = true
|
||||
app.HideHelp = false
|
||||
@ -1194,17 +1194,7 @@ func main() {
|
||||
fmt.Printf("%#v\n", nc.IntSlice("blups"))
|
||||
fmt.Printf("%#v\n", nc.String("snurt"))
|
||||
fmt.Printf("%#v\n", nc.StringSlice("snurkles"))
|
||||
fmt.Printf("%#v\n", nc.Bool("global-nope"))
|
||||
fmt.Printf("%#v\n", !nc.Bool("global-nerp"))
|
||||
fmt.Printf("%#v\n", nc.Duration("global-howlong"))
|
||||
fmt.Printf("%#v\n", nc.Float64("global-hay"))
|
||||
fmt.Printf("%#v\n", nc.Generic("global-bloop"))
|
||||
fmt.Printf("%#v\n", nc.Int("global-bips"))
|
||||
fmt.Printf("%#v\n", nc.IntSlice("global-blups"))
|
||||
fmt.Printf("%#v\n", nc.String("global-snurt"))
|
||||
fmt.Printf("%#v\n", nc.StringSlice("global-snurkles"))
|
||||
|
||||
fmt.Printf("%#v\n", nc.FlagNames())
|
||||
fmt.Printf("%#v\n", nc.FlagNames())
|
||||
fmt.Printf("%#v\n", nc.IsSet("wat"))
|
||||
fmt.Printf("%#v\n", nc.Set("wat", "nope"))
|
||||
|
Loading…
Reference in New Issue
Block a user