Merge remote-tracking branch 'origin/v2' into string-slice-overwrite-on-set

This commit is contained in:
Dan Buch 2016-05-05 10:16:58 -04:00
commit a4590caea5
No known key found for this signature in database
GPG Key ID: FAEF12936DD3E3EC

View File

@ -46,6 +46,9 @@ func main() {
This app will run and show help text, but is not very useful. Let's give an action to execute and some help documentation: This app will run and show help text, but is not very useful. Let's give an action to execute and some help documentation:
<!-- {
"output": "boom! I say!"
} -->
``` go ``` go
package main package main
@ -77,6 +80,9 @@ Being a programmer can be a lonely job. Thankfully by the power of automation th
Start by creating a directory named `greet`, and within it, add a file, `greet.go` with the following code in it: Start by creating a directory named `greet`, and within it, add a file, `greet.go` with the following code in it:
<!-- {
"output": "Hello friend!"
} -->
``` go ``` go
package main package main
@ -210,6 +216,7 @@ Sometimes it's useful to specify a flag's value within the usage string itself.
indicated with back quotes. indicated with back quotes.
For example this: For example this:
```go ```go
cli.StringFlag{ cli.StringFlag{
Name: "config, c", Name: "config, c",
@ -504,6 +511,9 @@ templates are exposed as variables `AppHelpTemplate`, `CommandHelpTemplate`, and
is possible by assigning a compatible func to the `cli.HelpPrinter` variable, is possible by assigning a compatible func to the `cli.HelpPrinter` variable,
e.g.: e.g.:
<!-- {
"output": "Ha HA. I pwnd the help!!1"
} -->
``` go ``` go
package main package main