Merge pull request #24 from AlexanderChen1989/master

README.md fix
This commit is contained in:
Jeremy Saenz 2013-07-23 09:20:31 -07:00
commit 933a037bf0

View File

@ -131,10 +131,14 @@ app.Flags = []cli.Flag {
cli.StringFlag{"lang", "english", "language for the greeting"},
}
app.Action = func(c *cli.Context) {
name := "someone"
if len(c.Args()) > 0 {
name = c.Args()[0]
}
if c.String("lang") == "spanish" {
println("Hola", c.Args()[0])
println("Hola", name)
} else {
println("Hello", c.Args()[0])
println("Hello", name)
}
}
...