Merge branch 'master' into lynncyrin-patch-7

This commit is contained in:
lynn [they] 2019-12-20 01:31:00 -08:00 committed by GitHub
commit ebf99a6187
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -48,8 +48,8 @@ func (a *App) writeDocTemplate(w io.Writer) error {
return t.ExecuteTemplate(w, name, &cliTemplate{ return t.ExecuteTemplate(w, name, &cliTemplate{
App: a, App: a,
Commands: prepareCommands(a.Commands, 0), Commands: prepareCommands(a.Commands, 0),
GlobalArgs: prepareArgsWithValues(a.Flags), GlobalArgs: prepareArgsWithValues(a.VisibleFlags()),
SynopsisArgs: prepareArgsSynopsis(a.Flags), SynopsisArgs: prepareArgsSynopsis(a.VisibleFlags()),
}) })
} }

View File

@ -22,6 +22,10 @@ func testApp() *App {
Aliases: []string{"b"}, Aliases: []string{"b"},
Usage: "another usage text", Usage: "another usage text",
}, },
&BoolFlag{
Name: "hidden-flag",
Hidden: true,
},
} }
app.Commands = []*Command{{ app.Commands = []*Command{{
Aliases: []string{"c"}, Aliases: []string{"c"},