Skip to content

Commit 0746f02

Browse files
committed
markdown: display bool type
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
1 parent 522da51 commit 0746f02

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

clidocstool_md.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,7 @@ func mdCmdOutput(cmd *cobra.Command, old string) (string, error) {
240240
}
241241
name += mdMakeLink("`--"+f.Name+"`", f.Name, f, isLink)
242242

243-
var ftype string
244-
if f.Value.Type() != "bool" || (f.Value.Type() == "bool" && f.DefValue == "true") {
245-
ftype = "`" + f.Value.Type() + "`"
246-
}
243+
ftype := "`" + f.Value.Type() + "`"
247244

248245
var defval string
249246
if v, ok := f.Annotations[annotation.DefaultValue]; ok && len(v) > 0 {

fixtures/buildx_build.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ Start a build
2222
| [`-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`) |
2323
| `--iidfile` | `string` | | Write the image ID to the file |
2424
| `--label` | `stringArray` | | Set metadata for an image |
25-
| `--load` | | | Shorthand for `--output=type=docker` |
25+
| `--load` | `bool` | | Shorthand for `--output=type=docker` |
2626
| `--network` | `string` | `default` | Set the networking mode for the `RUN` instructions during build |
2727
| `-o`, `--output` | `stringArray` | | Output destination (format: `type=local,dest=path`) |
2828
| `--platform` | `stringArray` | local | Set target platform for build |
29-
| `--push` | | | Shorthand for `--output=type=registry` |
30-
| `-q`, `--quiet` | | | Suppress the build output and print image ID on success |
29+
| `--push` | `bool` | | Shorthand for `--output=type=registry` |
30+
| `-q`, `--quiet` | `bool` | | Suppress the build output and print image ID on success |
3131
| `--secret` | `stringArray` | | Secret file to expose to the build (format: `id=mysecret,src=/local/secret`) |
3232
| `--shm-size` | `string` | | Size of `/dev/shm` |
3333
| `--ssh` | `stringArray` | | SSH agent socket or keys to expose to the build<br>format: `default\|<id>[=<socket>\|<key>[,<key>]]` |

0 commit comments

Comments
 (0)