mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update cli-docs-tool to 0.6.0
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
9
vendor/github.com/docker/cli-docs-tool/clidocstool_md.go
generated
vendored
9
vendor/github.com/docker/cli-docs-tool/clidocstool_md.go
generated
vendored
@ -53,6 +53,12 @@ func (c *Client) GenMarkdownTree(cmd *cobra.Command) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Skip hidden command
|
||||
if cmd.Hidden {
|
||||
log.Printf("INFO: Skipping Markdown for %q (hidden command)", cmd.CommandPath())
|
||||
return nil
|
||||
}
|
||||
|
||||
log.Printf("INFO: Generating Markdown for %q", cmd.CommandPath())
|
||||
mdFile := mdFilename(cmd)
|
||||
sourcePath := filepath.Join(c.source, mdFile)
|
||||
@ -208,6 +214,9 @@ func mdCmdOutput(cmd *cobra.Command, old string) (string, error) {
|
||||
b.WriteString("### Subcommands\n\n")
|
||||
table := newMdTable("Name", "Description")
|
||||
for _, c := range cmd.Commands() {
|
||||
if c.Hidden {
|
||||
continue
|
||||
}
|
||||
table.AddRow(fmt.Sprintf("[`%s`](%s)", c.Name(), mdFilename(c)), c.Short)
|
||||
}
|
||||
b.WriteString(table.String() + "\n")
|
||||
|
2
vendor/github.com/docker/cli-docs-tool/clidocstool_yaml.go
generated
vendored
2
vendor/github.com/docker/cli-docs-tool/clidocstool_yaml.go
generated
vendored
@ -62,6 +62,7 @@ type cmdDoc struct {
|
||||
InheritedOptions []cmdOption `yaml:"inherited_options,omitempty"`
|
||||
Example string `yaml:"examples,omitempty"`
|
||||
Deprecated bool
|
||||
Hidden bool
|
||||
MinAPIVersion string `yaml:"min_api_version,omitempty"`
|
||||
Experimental bool
|
||||
ExperimentalCLI bool
|
||||
@ -155,6 +156,7 @@ func (c *Client) genYamlCustom(cmd *cobra.Command, w io.Writer) error {
|
||||
Long: forceMultiLine(cmd.Long, longMaxWidth),
|
||||
Example: cmd.Example,
|
||||
Deprecated: len(cmd.Deprecated) > 0,
|
||||
Hidden: cmd.Hidden,
|
||||
}
|
||||
|
||||
if len(cliDoc.Long) == 0 {
|
||||
|
Reference in New Issue
Block a user