mirror of https://github.com/docker/buildx.git
vendor: github.com/docker/cli-docs-tool v0.10.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
parent
6e562e9ede
commit
934cca3ab1
2
go.mod
2
go.mod
|
@ -17,7 +17,7 @@ require (
|
||||||
github.com/davecgh/go-spew v1.1.1
|
github.com/davecgh/go-spew v1.1.1
|
||||||
github.com/distribution/reference v0.6.0
|
github.com/distribution/reference v0.6.0
|
||||||
github.com/docker/cli v28.1.1+incompatible
|
github.com/docker/cli v28.1.1+incompatible
|
||||||
github.com/docker/cli-docs-tool v0.9.0
|
github.com/docker/cli-docs-tool v0.10.0
|
||||||
github.com/docker/docker v28.1.1+incompatible
|
github.com/docker/docker v28.1.1+incompatible
|
||||||
github.com/docker/go-units v0.5.0
|
github.com/docker/go-units v0.5.0
|
||||||
github.com/gofrs/flock v0.12.1
|
github.com/gofrs/flock v0.12.1
|
||||||
|
|
4
go.sum
4
go.sum
|
@ -110,8 +110,8 @@ github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5Qvfr
|
||||||
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
|
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
|
||||||
github.com/docker/cli v28.1.1+incompatible h1:eyUemzeI45DY7eDPuwUcmDyDj1pM98oD5MdSpiItp8k=
|
github.com/docker/cli v28.1.1+incompatible h1:eyUemzeI45DY7eDPuwUcmDyDj1pM98oD5MdSpiItp8k=
|
||||||
github.com/docker/cli v28.1.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
github.com/docker/cli v28.1.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
||||||
github.com/docker/cli-docs-tool v0.9.0 h1:CVwQbE+ZziwlPqrJ7LRyUF6GvCA+6gj7MTCsayaK9t0=
|
github.com/docker/cli-docs-tool v0.10.0 h1:bOD6mKynPQgojQi3s2jgcUWGp/Ebqy1SeCr9VfKQLLU=
|
||||||
github.com/docker/cli-docs-tool v0.9.0/go.mod h1:ClrwlNW+UioiRyH9GiAOe1o3J/TsY3Tr1ipoypjAUtc=
|
github.com/docker/cli-docs-tool v0.10.0/go.mod h1:5EM5zPnT2E7yCLERZmrDA234Vwn09fzRHP4aX1qwp1U=
|
||||||
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||||
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
|
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
|
||||||
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||||
|
|
|
@ -1,34 +1,38 @@
|
||||||
run:
|
version: "2"
|
||||||
timeout: 10m
|
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
|
default: none
|
||||||
enable:
|
enable:
|
||||||
- depguard
|
- depguard
|
||||||
- gofmt
|
|
||||||
- goimports
|
|
||||||
- revive
|
- revive
|
||||||
- govet
|
- govet
|
||||||
- importas
|
- importas
|
||||||
- ineffassign
|
- ineffassign
|
||||||
- misspell
|
- misspell
|
||||||
- typecheck
|
|
||||||
- errname
|
- errname
|
||||||
- makezero
|
- makezero
|
||||||
- whitespace
|
- whitespace
|
||||||
disable-all: true
|
settings:
|
||||||
|
depguard:
|
||||||
linters-settings:
|
rules:
|
||||||
depguard:
|
main:
|
||||||
|
deny:
|
||||||
|
- pkg: io/ioutil
|
||||||
|
desc: The io/ioutil package has been deprecated, see https://go.dev/doc/go1.16#ioutil
|
||||||
|
importas:
|
||||||
|
no-unaliased: true
|
||||||
|
exclusions:
|
||||||
|
generated: lax
|
||||||
rules:
|
rules:
|
||||||
main:
|
- linters:
|
||||||
deny:
|
- revive
|
||||||
- pkg: io/ioutil
|
text: stutters
|
||||||
desc: The io/ioutil package has been deprecated, see https://go.dev/doc/go1.16#ioutil
|
|
||||||
importas:
|
formatters:
|
||||||
no-unaliased: true
|
enable:
|
||||||
|
- gofmt
|
||||||
|
- goimports
|
||||||
|
|
||||||
issues:
|
issues:
|
||||||
exclude-rules:
|
max-issues-per-linter: 0
|
||||||
- linters:
|
max-same-issues: 0
|
||||||
- revive
|
|
||||||
text: "stutters"
|
|
||||||
|
|
|
@ -14,9 +14,9 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
ARG GO_VERSION="1.23"
|
ARG GO_VERSION="1.24"
|
||||||
ARG XX_VERSION="1.6.1"
|
ARG XX_VERSION="1.6.1"
|
||||||
ARG GOLANGCI_LINT_VERSION="v1.62"
|
ARG GOLANGCI_LINT_VERSION="v2.1.5"
|
||||||
ARG ADDLICENSE_VERSION="v1.1.1"
|
ARG ADDLICENSE_VERSION="v1.1.1"
|
||||||
|
|
||||||
ARG LICENSE_ARGS="-c cli-docs-tool -l apache"
|
ARG LICENSE_ARGS="-c cli-docs-tool -l apache"
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
|
// Package annotation handles annotations for CLI commands.
|
||||||
package annotation
|
package annotation
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
|
// Package clidocstool provides tools for generating CLI documentation.
|
||||||
package clidocstool
|
package clidocstool
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -64,6 +64,14 @@ func (c *Client) genManTreeCustom(cmd *cobra.Command) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Skip hidden command recursively
|
||||||
|
for curr := cmd; curr != nil; curr = curr.Parent() {
|
||||||
|
if curr.Hidden {
|
||||||
|
log.Printf("INFO: Skipping Man for %q (hidden command)", curr.CommandPath())
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
log.Printf("INFO: Generating Man for %q", cmd.CommandPath())
|
log.Printf("INFO: Generating Man for %q", cmd.CommandPath())
|
||||||
|
|
||||||
return doc.GenManTreeFromOpts(cmd, doc.GenManTreeOptions{
|
return doc.GenManTreeFromOpts(cmd, doc.GenManTreeOptions{
|
||||||
|
|
|
@ -53,10 +53,12 @@ func (c *Client) GenMarkdownTree(cmd *cobra.Command) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Skip hidden command
|
// Skip hidden command recursively
|
||||||
if cmd.Hidden {
|
for curr := cmd; curr != nil; curr = curr.Parent() {
|
||||||
log.Printf("INFO: Skipping Markdown for %q (hidden command)", cmd.CommandPath())
|
if curr.Hidden {
|
||||||
return nil
|
log.Printf("INFO: Skipping Markdown for %q (hidden command)", curr.CommandPath())
|
||||||
|
return nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Printf("INFO: Generating Markdown for %q", cmd.CommandPath())
|
log.Printf("INFO: Generating Markdown for %q", cmd.CommandPath())
|
||||||
|
|
|
@ -169,6 +169,9 @@ func (c *Client) genYamlCustom(cmd *cobra.Command, w io.Writer) error {
|
||||||
|
|
||||||
// check recursively to handle inherited annotations
|
// check recursively to handle inherited annotations
|
||||||
for curr := cmd; curr != nil; curr = curr.Parent() {
|
for curr := cmd; curr != nil; curr = curr.Parent() {
|
||||||
|
if curr.Hidden {
|
||||||
|
cliDoc.Hidden = true
|
||||||
|
}
|
||||||
if v, ok := curr.Annotations["version"]; ok && cliDoc.MinAPIVersion == "" {
|
if v, ok := curr.Annotations["version"]; ok && cliDoc.MinAPIVersion == "" {
|
||||||
cliDoc.MinAPIVersion = v
|
cliDoc.MinAPIVersion = v
|
||||||
}
|
}
|
||||||
|
@ -349,9 +352,9 @@ func genFlagResult(cmd *cobra.Command, flags *pflag.FlagSet, anchors map[string]
|
||||||
//
|
//
|
||||||
// This makes the generated YAML more readable, and easier to review changes.
|
// This makes the generated YAML more readable, and easier to review changes.
|
||||||
// max can be used to customize the width to keep the whole line < 80 chars.
|
// max can be used to customize the width to keep the whole line < 80 chars.
|
||||||
func forceMultiLine(s string, max int) string {
|
func forceMultiLine(s string, maxWidth int) string {
|
||||||
s = strings.TrimSpace(s)
|
s = strings.TrimSpace(s)
|
||||||
if len(s) > max && !strings.Contains(s, "\n") {
|
if len(s) > maxWidth && !strings.Contains(s, "\n") {
|
||||||
s = s + "\n"
|
s = s + "\n"
|
||||||
}
|
}
|
||||||
return s
|
return s
|
||||||
|
|
|
@ -250,8 +250,8 @@ github.com/docker/cli/internal/tui
|
||||||
github.com/docker/cli/opts
|
github.com/docker/cli/opts
|
||||||
github.com/docker/cli/pkg/kvfile
|
github.com/docker/cli/pkg/kvfile
|
||||||
github.com/docker/cli/templates
|
github.com/docker/cli/templates
|
||||||
# github.com/docker/cli-docs-tool v0.9.0
|
# github.com/docker/cli-docs-tool v0.10.0
|
||||||
## explicit; go 1.18
|
## explicit; go 1.23.0
|
||||||
github.com/docker/cli-docs-tool
|
github.com/docker/cli-docs-tool
|
||||||
github.com/docker/cli-docs-tool/annotation
|
github.com/docker/cli-docs-tool/annotation
|
||||||
# github.com/docker/distribution v2.8.3+incompatible
|
# github.com/docker/distribution v2.8.3+incompatible
|
||||||
|
|
Loading…
Reference in New Issue