Approval for public API change
This commit is contained in:
parent
e925d26b97
commit
4c9651575c
17
testdata/godoc-v2.x.txt
vendored
17
testdata/godoc-v2.x.txt
vendored
@ -82,12 +82,10 @@ DESCRIPTION:
|
|||||||
|
|
||||||
OPTIONS:{{range .VisibleFlagCategories}}
|
OPTIONS:{{range .VisibleFlagCategories}}
|
||||||
{{if .Name}}{{.Name}}
|
{{if .Name}}{{.Name}}
|
||||||
{{end}}{{range .Flags}}{{.}}
|
{{end}}{{range .Flags}}{{.}}{{end}}{{end}}{{else}}{{if .VisibleFlags}}
|
||||||
{{end}}{{end}}{{else}}{{if .VisibleFlags}}
|
|
||||||
|
|
||||||
OPTIONS:
|
OPTIONS:
|
||||||
{{range .VisibleFlags}}{{.}}
|
{{range .VisibleFlags}}{{.}}{{end}}{{end}}{{end}}
|
||||||
{{end}}{{end}}{{end}}
|
|
||||||
`
|
`
|
||||||
CommandHelpTemplate is the text template for the command help topic. cli.go
|
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
|
uses text/template to render templates. You can render custom help text by
|
||||||
@ -161,8 +159,7 @@ COMMANDS:{{range .VisibleCategories}}{{if .Name}}
|
|||||||
{{$s := join .Names ", "}}{{$s}}{{ $sp := subtract $cv (offset $s 3) }}{{ indent $sp ""}}{{wrap .Usage $cv}}{{end}}{{end}}{{end}}{{if .VisibleFlags}}
|
{{$s := join .Names ", "}}{{$s}}{{ $sp := subtract $cv (offset $s 3) }}{{ indent $sp ""}}{{wrap .Usage $cv}}{{end}}{{end}}{{end}}{{if .VisibleFlags}}
|
||||||
|
|
||||||
OPTIONS:
|
OPTIONS:
|
||||||
{{range .VisibleFlags}}{{.}}
|
{{range .VisibleFlags}}{{.}}{{end}}{{end}}
|
||||||
{{end}}{{end}}
|
|
||||||
`
|
`
|
||||||
SubcommandHelpTemplate is the text template for the subcommand help topic.
|
SubcommandHelpTemplate is the text template for the subcommand help topic.
|
||||||
cli.go uses text/template to render templates. You can render custom help
|
cli.go uses text/template to render templates. You can render custom help
|
||||||
@ -558,6 +555,7 @@ type Command struct {
|
|||||||
// cli.go uses text/template to render templates. You can
|
// cli.go uses text/template to render templates. You can
|
||||||
// render custom help text by setting this variable.
|
// render custom help text by setting this variable.
|
||||||
CustomHelpTemplate string
|
CustomHelpTemplate string
|
||||||
|
|
||||||
// Has unexported fields.
|
// Has unexported fields.
|
||||||
}
|
}
|
||||||
Command is a subcommand for a cli.App.
|
Command is a subcommand for a cli.App.
|
||||||
@ -576,6 +574,13 @@ func (c *Command) Run(ctx *Context) (err error)
|
|||||||
Run invokes the command given the context, parses ctx.Args() to generate
|
Run invokes the command given the context, parses ctx.Args() to generate
|
||||||
command-specific flags
|
command-specific flags
|
||||||
|
|
||||||
|
func (c *Command) VisibleCategories() []CommandCategory
|
||||||
|
VisibleCategories returns a slice of categories and commands that are
|
||||||
|
Hidden=false
|
||||||
|
|
||||||
|
func (c *Command) VisibleCommands() []*Command
|
||||||
|
VisibleCommands returns a slice of the Commands with Hidden=false
|
||||||
|
|
||||||
func (c *Command) VisibleFlagCategories() []VisibleFlagCategory
|
func (c *Command) VisibleFlagCategories() []VisibleFlagCategory
|
||||||
VisibleFlagCategories returns a slice containing all the visible flag
|
VisibleFlagCategories returns a slice containing all the visible flag
|
||||||
categories with the flags they contain
|
categories with the flags they contain
|
||||||
|
Loading…
x
Reference in New Issue
Block a user