From 55016421fd7dec8762a592c7a080316e263e983c Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 10 Jun 2026 11:33:01 +0200 Subject: [PATCH 1/2] man: remove tools.go in favor of tools directive Signed-off-by: Sebastiaan van Stijn --- man/tools.go | 5 ----- vendor.mod | 7 +++++-- 2 files changed, 5 insertions(+), 7 deletions(-) delete mode 100644 man/tools.go diff --git a/man/tools.go b/man/tools.go deleted file mode 100644 index 7df67d824a13..000000000000 --- a/man/tools.go +++ /dev/null @@ -1,5 +0,0 @@ -//go:build tools - -package main - -import _ "github.com/cpuguy83/go-md2man/v2" diff --git a/vendor.mod b/vendor.mod index 57f0ce7847b1..a3e33521960b 100644 --- a/vendor.mod +++ b/vendor.mod @@ -6,14 +6,16 @@ module github.com/docker/cli go 1.25.0 -tool golang.org/x/mod/modfile // for module compatibility check +tool ( + github.com/cpuguy83/go-md2man/v2 // for scripts/docs/generate-man.sh + golang.org/x/mod/modfile // for module compatibility check +) require ( dario.cat/mergo v1.0.2 github.com/containerd/errdefs v1.0.0 github.com/containerd/log v0.1.0 github.com/containerd/platforms v1.0.0-rc.4 - github.com/cpuguy83/go-md2man/v2 v2.0.7 github.com/creack/pty v1.1.24 github.com/distribution/reference v0.6.0 github.com/docker/cli-docs-tool v0.11.0 @@ -74,6 +76,7 @@ require ( github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/clipperhouse/uax29/v2 v2.2.0 // indirect github.com/containerd/errdefs/pkg v0.3.0 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect github.com/docker/go-events v0.0.0-20250808211157-605354379745 // indirect github.com/docker/go-metrics v0.0.1 // indirect github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 // indirect From 1c22ca1aac42c540ba4729a4ecf715643f60fff8 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 10 Jun 2026 11:49:33 +0200 Subject: [PATCH 2/2] scripts/docs: use "go install tool" Signed-off-by: Sebastiaan van Stijn --- scripts/docs/generate-man.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/docs/generate-man.sh b/scripts/docs/generate-man.sh index cc8f826cb63c..9f0e4e41b54b 100755 --- a/scripts/docs/generate-man.sh +++ b/scripts/docs/generate-man.sh @@ -7,9 +7,10 @@ set -eu if ! command -v "$GO_MD2MAN" > /dev/null; then ( set -x - go build -mod=vendor -modfile=vendor.mod -o ./build/tools/go-md2man ./vendor/github.com/cpuguy83/go-md2man/v2 + # note: this installs all tools defined in go.mod/vendor.mod + GOBIN="$(pwd)/build/tools" go install -mod=vendor -modfile=vendor.mod tool ) - GO_MD2MAN=$(realpath ./build/tools/go-md2man) + GO_MD2MAN="$(pwd)/build/tools/go-md2man" fi mkdir -p man/man1