From 0746f02f824bda0fb54ae0841af208b2a4d82b22 Mon Sep 17 00:00:00 2001
From: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Date: Wed, 21 Feb 2024 10:52:58 +0100
Subject: [PATCH] markdown: display bool type
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
---
clidocstool_md.go | 5 +----
fixtures/buildx_build.md | 6 +++---
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/clidocstool_md.go b/clidocstool_md.go
index 0b08d9e..a35b62d 100644
--- a/clidocstool_md.go
+++ b/clidocstool_md.go
@@ -240,10 +240,7 @@ func mdCmdOutput(cmd *cobra.Command, old string) (string, error) {
}
name += mdMakeLink("`--"+f.Name+"`", f.Name, f, isLink)
- var ftype string
- if f.Value.Type() != "bool" || (f.Value.Type() == "bool" && f.DefValue == "true") {
- ftype = "`" + f.Value.Type() + "`"
- }
+ ftype := "`" + f.Value.Type() + "`"
var defval string
if v, ok := f.Annotations[annotation.DefaultValue]; ok && len(v) > 0 {
diff --git a/fixtures/buildx_build.md b/fixtures/buildx_build.md
index c8a9f73..3caa3b9 100644
--- a/fixtures/buildx_build.md
+++ b/fixtures/buildx_build.md
@@ -22,12 +22,12 @@ Start a build
| [`-f`](https://docs.docker.com/engine/reference/commandline/build/#specify-a-dockerfile--f), [`--file`](https://docs.docker.com/engine/reference/commandline/build/#specify-a-dockerfile--f) | `string` | | Name of the Dockerfile (default: `PATH/Dockerfile`) |
| `--iidfile` | `string` | | Write the image ID to the file |
| `--label` | `stringArray` | | Set metadata for an image |
-| `--load` | | | Shorthand for `--output=type=docker` |
+| `--load` | `bool` | | Shorthand for `--output=type=docker` |
| `--network` | `string` | `default` | Set the networking mode for the `RUN` instructions during build |
| `-o`, `--output` | `stringArray` | | Output destination (format: `type=local,dest=path`) |
| `--platform` | `stringArray` | local | Set target platform for build |
-| `--push` | | | Shorthand for `--output=type=registry` |
-| `-q`, `--quiet` | | | Suppress the build output and print image ID on success |
+| `--push` | `bool` | | Shorthand for `--output=type=registry` |
+| `-q`, `--quiet` | `bool` | | Suppress the build output and print image ID on success |
| `--secret` | `stringArray` | | Secret file to expose to the build (format: `id=mysecret,src=/local/secret`) |
| `--shm-size` | `string` | | Size of `/dev/shm` |
| `--ssh` | `stringArray` | | SSH agent socket or keys to expose to the build
format: `default\|[=\|[,]]` |