Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Cui <[email protected]>
  • Loading branch information
BlackHole1 committed Jul 9, 2024
1 parent 3b1ad97 commit eba3ce6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions godoc-current.txt
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,8 @@ func (cmd *Command) VisibleFlags() []Flag
VisibleFlags returns a slice of the Flags with Hidden=false

func (cmd *Command) VisiblePersistentFlags() []Flag
VisiblePersistentFlags returns a slice of PersistentFlag with
Persistent=true and Hidden=false.

type CommandCategories interface {
// AddCommand adds a command to a category, creating a new category if necessary.
Expand Down
8 changes: 7 additions & 1 deletion testdata/godoc-v3.x.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ DESCRIPTION:

OPTIONS:{{template "visibleFlagCategoryTemplate" .}}{{else if .VisibleFlags}}

OPTIONS:{{template "visibleFlagTemplate" .}}{{end}}
OPTIONS:{{template "visibleFlagTemplate" .}}{{end}}{{if .VisiblePersistentFlags}}

GLOBAL OPTIONS:{{template "visiblePersistentFlagTemplate" .}}{{end}}
`
CommandHelpTemplate is the text template for the command help topic. cli.go
uses text/template to render templates. You can render custom help text by
Expand Down Expand Up @@ -516,6 +518,10 @@ func (cmd *Command) VisibleFlagCategories() []VisibleFlagCategory
func (cmd *Command) VisibleFlags() []Flag
VisibleFlags returns a slice of the Flags with Hidden=false

func (cmd *Command) VisiblePersistentFlags() []Flag
VisiblePersistentFlags returns a slice of PersistentFlag with
Persistent=true and Hidden=false.

type CommandCategories interface {
// AddCommand adds a command to a category, creating a new category if necessary.
AddCommand(category string, command *Command)
Expand Down

0 comments on commit eba3ce6

Please sign in to comment.