mirror of https://github.com/docker/buildx.git
vendor: update cli-docs-tool to 0.6.0
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
2eba60db75
commit
cbc473359a
2
go.mod
2
go.mod
|
@ -11,7 +11,7 @@ require (
|
|||
github.com/containerd/continuity v0.4.1
|
||||
github.com/containerd/typeurl/v2 v2.1.1
|
||||
github.com/docker/cli v24.0.2+incompatible
|
||||
github.com/docker/cli-docs-tool v0.5.1
|
||||
github.com/docker/cli-docs-tool v0.6.0
|
||||
github.com/docker/distribution v2.8.2+incompatible
|
||||
github.com/docker/docker v24.0.2+incompatible
|
||||
github.com/docker/go-units v0.5.0
|
||||
|
|
4
go.sum
4
go.sum
|
@ -151,8 +151,8 @@ github.com/distribution/distribution/v3 v3.0.0-20230214150026-36d8c594d7aa h1:L9
|
|||
github.com/distribution/distribution/v3 v3.0.0-20230214150026-36d8c594d7aa/go.mod h1:WHNsWjnIn2V1LYOrME7e8KxSeKunYHsxEm4am0BUtcI=
|
||||
github.com/docker/cli v24.0.2+incompatible h1:QdqR7znue1mtkXIJ+ruQMGQhpw2JzMJLRXp6zpzF6tM=
|
||||
github.com/docker/cli v24.0.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
||||
github.com/docker/cli-docs-tool v0.5.1 h1:jIk/cCZurZERhALPVKhqlNxTQGxn2kcI+56gE57PQXg=
|
||||
github.com/docker/cli-docs-tool v0.5.1/go.mod h1:zMjqTFCU361PRh8apiXzeAZ1Q/xupbIwTusYpzCXS/o=
|
||||
github.com/docker/cli-docs-tool v0.6.0 h1:Z9x10SaZgFaB6jHgz3OWooynhSa40CsWkpe5hEnG/qA=
|
||||
github.com/docker/cli-docs-tool v0.6.0/go.mod h1:zMjqTFCU361PRh8apiXzeAZ1Q/xupbIwTusYpzCXS/o=
|
||||
github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8=
|
||||
github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||
github.com/docker/docker v24.0.2+incompatible h1:eATx+oLz9WdNVkQrr0qjQ8HvRJ4bOOxfzEo8R+dA3cg=
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -231,7 +231,7 @@ github.com/docker/cli/cli/streams
|
|||
github.com/docker/cli/cli/trust
|
||||
github.com/docker/cli/cli/version
|
||||
github.com/docker/cli/opts
|
||||
# github.com/docker/cli-docs-tool v0.5.1
|
||||
# github.com/docker/cli-docs-tool v0.6.0
|
||||
## explicit; go 1.18
|
||||
github.com/docker/cli-docs-tool
|
||||
github.com/docker/cli-docs-tool/annotation
|
||||
|
|
Loading…
Reference in New Issue