Skip to content

Commit

Permalink
Merge pull request #1173 from zemzale/fix-documentation
Browse files Browse the repository at this point in the history
Fix v1 aliases syntax in v2 docs
  • Loading branch information
coilysiren committed Oct 22, 2020
2 parents 30bb698 + d273947 commit e062e73
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions docs/v2/manual.md
Expand Up @@ -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{
{
Expand Down Expand Up @@ -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",
},
Expand Down Expand Up @@ -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"},
}
Expand Down Expand Up @@ -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",
}

Expand Down

0 comments on commit e062e73

Please sign in to comment.