Merge pull request #1173 from zemzale/fix-documentation

Fix v1 aliases syntax in v2 docs
This commit is contained in:
lynn (they) 2020-10-21 20:18:45 -07:00 committed by GitHub
commit e062e733d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -425,15 +425,17 @@ import (
func main() {
app := &cli.App{
Flags: []cli.Flag{
&cli.StringFlag{
Name: "lang, l",
Value: "english",
Usage: "Language for the greeting",
},
&cli.StringFlag{
Name: "config, c",
Usage: "Load configuration from `FILE`",
},
&cli.StringFlag{
Name: "lang",
Aliases: []string{"l"},
Value: "english",
Usage: "Language for the greeting",
},
&cli.StringFlag{
Name: "config",
Aliases: []string{"c"},
Usage: "Load configuration from `FILE`",
},
},
Commands: []*cli.Command{
{
@ -570,7 +572,8 @@ func main() {
app.Flags = []cli.Flag {
&cli.StringFlag{
Name: "password, p",
Name: "password",
Aliases: []string{"p"},
Usage: "password for the mysql database",
FilePath: "/etc/mysql/password",
},
@ -1309,7 +1312,8 @@ import (
func main() {
cli.HelpFlag = &cli.BoolFlag{
Name: "haaaaalp", Aliases: []string{"halp"},
Name: "haaaaalp",
Aliases: []string{"halp"},
Usage: "HALP",
EnvVars: []string{"SHOW_HALP", "HALPPLZ"},
}
@ -1344,7 +1348,8 @@ import (
func main() {
cli.VersionFlag = &cli.BoolFlag{
Name: "print-version", Aliases: []string{"V"},
Name: "print-version",
Aliases: []string{"V"},
Usage: "print only the version",
}