mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-18 00:47:48 +08:00
vendor: github.com/docker/cli-docs-tool v0.9.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
parent
807d15ff9d
commit
8a472c6c9d
4
go.mod
4
go.mod
@ -18,7 +18,7 @@ require (
|
||||
github.com/davecgh/go-spew v1.1.1
|
||||
github.com/distribution/reference v0.6.0
|
||||
github.com/docker/cli v27.4.1+incompatible
|
||||
github.com/docker/cli-docs-tool v0.8.0
|
||||
github.com/docker/cli-docs-tool v0.9.0
|
||||
github.com/docker/docker v27.4.1+incompatible
|
||||
github.com/docker/go-units v0.5.0
|
||||
github.com/gofrs/flock v0.12.1
|
||||
@ -87,7 +87,7 @@ require (
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/containerd/containerd/api v1.7.19 // indirect
|
||||
github.com/containerd/ttrpc v1.2.5 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect
|
||||
github.com/docker/distribution v2.8.3+incompatible // indirect
|
||||
github.com/docker/docker-credential-helpers v0.8.2 // indirect
|
||||
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c // indirect
|
||||
|
8
go.sum
8
go.sum
@ -114,8 +114,8 @@ github.com/containerd/ttrpc v1.2.5/go.mod h1:YCXHsb32f+Sq5/72xHubdiJRQY9inL4a4ZQ
|
||||
github.com/containerd/typeurl/v2 v2.2.3 h1:yNA/94zxWdvYACdYO8zofhrTVuQY73fFU1y++dYSw40=
|
||||
github.com/containerd/typeurl/v2 v2.2.3/go.mod h1:95ljDnPfD3bAbDJRugOiShd/DlAAsxGtUBhJxIn7SCk=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/creack/pty v1.1.21 h1:1/QdRyBaHHJP61QkWMXlOIBfsgdDeeKfK8SYVUWJKf0=
|
||||
github.com/creack/pty v1.1.21/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
|
||||
@ -127,8 +127,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/docker/cli v27.4.1+incompatible h1:VzPiUlRJ/xh+otB75gva3r05isHMo5wXDfPRi5/b4hI=
|
||||
github.com/docker/cli v27.4.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
||||
github.com/docker/cli-docs-tool v0.8.0 h1:YcDWl7rQJC3lJ7WVZRwSs3bc9nka97QLWfyJQli8yJU=
|
||||
github.com/docker/cli-docs-tool v0.8.0/go.mod h1:8TQQ3E7mOXoYUs811LiPdUnAhXrcVsBIrW21a5pUbdk=
|
||||
github.com/docker/cli-docs-tool v0.9.0 h1:CVwQbE+ZziwlPqrJ7LRyUF6GvCA+6gj7MTCsayaK9t0=
|
||||
github.com/docker/cli-docs-tool v0.9.0/go.mod h1:ClrwlNW+UioiRyH9GiAOe1o3J/TsY3Tr1ipoypjAUtc=
|
||||
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/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||
|
11
vendor/github.com/cpuguy83/go-md2man/v2/md2man/roff.go
generated
vendored
11
vendor/github.com/cpuguy83/go-md2man/v2/md2man/roff.go
generated
vendored
@ -104,7 +104,7 @@ func (r *roffRenderer) RenderNode(w io.Writer, node *blackfriday.Node, entering
|
||||
node.Parent.Prev.Type == blackfriday.Heading &&
|
||||
node.Parent.Prev.FirstChild != nil &&
|
||||
bytes.EqualFold(node.Parent.Prev.FirstChild.Literal, []byte("NAME")) {
|
||||
before, after, found := bytes.Cut(node.Literal, []byte(" - "))
|
||||
before, after, found := bytesCut(node.Literal, []byte(" - "))
|
||||
escapeSpecialChars(w, before)
|
||||
if found {
|
||||
out(w, ` \- `)
|
||||
@ -406,3 +406,12 @@ func escapeSpecialCharsLine(w io.Writer, text []byte) {
|
||||
w.Write([]byte{'\\', text[i]}) // nolint: errcheck
|
||||
}
|
||||
}
|
||||
|
||||
// bytesCut is a copy of [bytes.Cut] to provide compatibility with go1.17
|
||||
// and older. We can remove this once we drop support for go1.17 and older.
|
||||
func bytesCut(s, sep []byte) (before, after []byte, found bool) {
|
||||
if i := bytes.Index(s, sep); i >= 0 {
|
||||
return s[:i], s[i+len(sep):], true
|
||||
}
|
||||
return s, nil, false
|
||||
}
|
||||
|
13
vendor/github.com/docker/cli-docs-tool/.golangci.yml
generated
vendored
13
vendor/github.com/docker/cli-docs-tool/.golangci.yml
generated
vendored
@ -3,7 +3,6 @@ run:
|
||||
|
||||
linters:
|
||||
enable:
|
||||
- deadcode
|
||||
- depguard
|
||||
- gofmt
|
||||
- goimports
|
||||
@ -13,7 +12,6 @@ linters:
|
||||
- ineffassign
|
||||
- misspell
|
||||
- typecheck
|
||||
- varcheck
|
||||
- errname
|
||||
- makezero
|
||||
- whitespace
|
||||
@ -21,12 +19,11 @@ linters:
|
||||
|
||||
linters-settings:
|
||||
depguard:
|
||||
list-type: blacklist
|
||||
include-go-root: true
|
||||
packages:
|
||||
# The io/ioutil package has been deprecated.
|
||||
# https://go.dev/doc/go1.16#ioutil
|
||||
- io/ioutil
|
||||
rules:
|
||||
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
|
||||
|
||||
|
43
vendor/github.com/docker/cli-docs-tool/Dockerfile
generated
vendored
43
vendor/github.com/docker/cli-docs-tool/Dockerfile
generated
vendored
@ -14,20 +14,37 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
ARG GO_VERSION="1.18"
|
||||
ARG GOLANGCI_LINT_VERSION="v1.45"
|
||||
ARG ADDLICENSE_VERSION="v1.0.0"
|
||||
ARG GO_VERSION="1.23"
|
||||
ARG XX_VERSION="1.6.1"
|
||||
ARG GOLANGCI_LINT_VERSION="v1.62"
|
||||
ARG ADDLICENSE_VERSION="v1.1.1"
|
||||
|
||||
ARG LICENSE_ARGS="-c cli-docs-tool -l apache"
|
||||
ARG LICENSE_FILES=".*\(Dockerfile\|\.go\|\.hcl\|\.sh\)"
|
||||
|
||||
FROM golangci/golangci-lint:${GOLANGCI_LINT_VERSION}-alpine AS golangci-lint
|
||||
FROM ghcr.io/google/addlicense:${ADDLICENSE_VERSION} AS addlicense
|
||||
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
|
||||
|
||||
FROM golang:${GO_VERSION}-alpine AS base
|
||||
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS base
|
||||
RUN apk add --no-cache cpio findutils git linux-headers
|
||||
ENV CGO_ENABLED=0
|
||||
WORKDIR /src
|
||||
COPY --link --from=xx / /
|
||||
|
||||
FROM base AS addlicense
|
||||
ARG ADDLICENSE_VERSION
|
||||
ARG TARGETPLATFORM
|
||||
RUN --mount=target=/root/.cache,type=cache \
|
||||
--mount=type=cache,target=/go/pkg/mod <<EOT
|
||||
set -ex
|
||||
xx-go install "github.com/google/addlicense@${ADDLICENSE_VERSION}"
|
||||
mkdir /out
|
||||
if ! xx-info is-cross; then
|
||||
mv /go/bin/addlicense /out
|
||||
else
|
||||
mv /go/bin/*/addlicense* /out
|
||||
fi
|
||||
EOT
|
||||
|
||||
FROM base AS vendored
|
||||
RUN --mount=type=bind,target=.,rw \
|
||||
@ -40,15 +57,15 @@ COPY --from=vendored /out /
|
||||
|
||||
FROM vendored AS vendor-validate
|
||||
RUN --mount=type=bind,target=.,rw <<EOT
|
||||
set -e
|
||||
git add -A
|
||||
cp -rf /out/* .
|
||||
diff=$(git status --porcelain -- go.mod go.sum)
|
||||
if [ -n "$diff" ]; then
|
||||
set -e
|
||||
git add -A
|
||||
cp -rf /out/* .
|
||||
diff=$(git status --porcelain -- go.mod go.sum)
|
||||
if [ -n "$diff" ]; then
|
||||
echo >&2 'ERROR: Vendor result differs. Please vendor your package with "docker buildx bake vendor"'
|
||||
echo "$diff"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
EOT
|
||||
|
||||
FROM base AS lint
|
||||
@ -61,7 +78,7 @@ FROM base AS license-set
|
||||
ARG LICENSE_ARGS
|
||||
ARG LICENSE_FILES
|
||||
RUN --mount=type=bind,target=.,rw \
|
||||
--mount=from=addlicense,source=/app/addlicense,target=/usr/bin/addlicense \
|
||||
--mount=from=addlicense,source=/out/addlicense,target=/usr/bin/addlicense \
|
||||
find . -regex "${LICENSE_FILES}" | xargs addlicense ${LICENSE_ARGS} \
|
||||
&& mkdir /out \
|
||||
&& find . -regex "${LICENSE_FILES}" | cpio -pdm /out
|
||||
@ -73,7 +90,7 @@ FROM base AS license-validate
|
||||
ARG LICENSE_ARGS
|
||||
ARG LICENSE_FILES
|
||||
RUN --mount=type=bind,target=. \
|
||||
--mount=from=addlicense,source=/app/addlicense,target=/usr/bin/addlicense \
|
||||
--mount=from=addlicense,source=/out/addlicense,target=/usr/bin/addlicense \
|
||||
find . -regex "${LICENSE_FILES}" | xargs addlicense -check ${LICENSE_ARGS}
|
||||
|
||||
FROM vendored AS test
|
||||
|
2
vendor/github.com/docker/cli-docs-tool/clidocstool.go
generated
vendored
2
vendor/github.com/docker/cli-docs-tool/clidocstool.go
generated
vendored
@ -65,7 +65,7 @@ func New(opts Options) (*Client, error) {
|
||||
} else {
|
||||
c.target = opts.TargetDir
|
||||
}
|
||||
if err := os.MkdirAll(c.target, 0755); err != nil {
|
||||
if err := os.MkdirAll(c.target, 0o755); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return c, nil
|
||||
|
2
vendor/github.com/docker/cli-docs-tool/clidocstool_md.go
generated
vendored
2
vendor/github.com/docker/cli-docs-tool/clidocstool_md.go
generated
vendored
@ -94,7 +94,7 @@ func (c *Client) GenMarkdownTree(cmd *cobra.Command) error {
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = os.WriteFile(targetPath, icBuf.Bytes(), 0644); err != nil {
|
||||
if err = os.WriteFile(targetPath, icBuf.Bytes(), 0o644); err != nil {
|
||||
return err
|
||||
}
|
||||
} else if err := copyFile(sourcePath, targetPath); err != nil {
|
||||
|
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
@ -77,7 +77,7 @@ type cmdDoc struct {
|
||||
// subcmds, `sub` and `sub-third`, and `sub` has a subcommand called `third`
|
||||
// it is undefined which help output will be in the file `cmd-sub-third.1`.
|
||||
func (c *Client) GenYamlTree(cmd *cobra.Command) error {
|
||||
emptyStr := func(s string) string { return "" }
|
||||
emptyStr := func(string) string { return "" }
|
||||
if err := c.loadLongDescription(cmd, "yaml"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
12
vendor/github.com/docker/cli-docs-tool/docker-bake.hcl
generated
vendored
12
vendor/github.com/docker/cli-docs-tool/docker-bake.hcl
generated
vendored
@ -12,6 +12,12 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
target "_common" {
|
||||
args = {
|
||||
BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1
|
||||
}
|
||||
}
|
||||
|
||||
group "default" {
|
||||
targets = ["test"]
|
||||
}
|
||||
@ -21,31 +27,37 @@ group "validate" {
|
||||
}
|
||||
|
||||
target "lint" {
|
||||
inherits = ["_common"]
|
||||
target = "lint"
|
||||
output = ["type=cacheonly"]
|
||||
}
|
||||
|
||||
target "vendor-validate" {
|
||||
inherits = ["_common"]
|
||||
target = "vendor-validate"
|
||||
output = ["type=cacheonly"]
|
||||
}
|
||||
|
||||
target "vendor-update" {
|
||||
inherits = ["_common"]
|
||||
target = "vendor-update"
|
||||
output = ["."]
|
||||
}
|
||||
|
||||
target "test" {
|
||||
inherits = ["_common"]
|
||||
target = "test-coverage"
|
||||
output = ["."]
|
||||
}
|
||||
|
||||
target "license-validate" {
|
||||
inherits = ["_common"]
|
||||
target = "license-validate"
|
||||
output = ["type=cacheonly"]
|
||||
}
|
||||
|
||||
target "license-update" {
|
||||
inherits = ["_common"]
|
||||
target = "license-update"
|
||||
output = ["."]
|
||||
}
|
||||
|
6
vendor/modules.txt
vendored
6
vendor/modules.txt
vendored
@ -209,8 +209,8 @@ github.com/containerd/ttrpc
|
||||
# github.com/containerd/typeurl/v2 v2.2.3
|
||||
## explicit; go 1.21
|
||||
github.com/containerd/typeurl/v2
|
||||
# github.com/cpuguy83/go-md2man/v2 v2.0.5
|
||||
## explicit; go 1.11
|
||||
# github.com/cpuguy83/go-md2man/v2 v2.0.6
|
||||
## explicit; go 1.12
|
||||
github.com/cpuguy83/go-md2man/v2/md2man
|
||||
# github.com/creack/pty v1.1.21
|
||||
## explicit; go 1.13
|
||||
@ -253,7 +253,7 @@ github.com/docker/cli/cli/version
|
||||
github.com/docker/cli/opts
|
||||
github.com/docker/cli/pkg/kvfile
|
||||
github.com/docker/cli/templates
|
||||
# github.com/docker/cli-docs-tool v0.8.0
|
||||
# github.com/docker/cli-docs-tool v0.9.0
|
||||
## explicit; go 1.18
|
||||
github.com/docker/cli-docs-tool
|
||||
github.com/docker/cli-docs-tool/annotation
|
||||
|
Loading…
x
Reference in New Issue
Block a user