Merge pull request #50 from crazy-max/display-bool-type

markdown: display bool type
This commit is contained in:
Sebastiaan van Stijn 2024-02-21 11:46:57 +01:00 коммит произвёл GitHub
Родитель 522da5169b 0746f02f82
Коммит a1e294d6f6
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
2 изменённых файлов: 4 добавлений и 7 удалений

Просмотреть файл

@ -240,10 +240,7 @@ func mdCmdOutput(cmd *cobra.Command, old string) (string, error) {
} }
name += mdMakeLink("`--"+f.Name+"`", f.Name, f, isLink) name += mdMakeLink("`--"+f.Name+"`", f.Name, f, isLink)
var ftype string ftype := "`" + f.Value.Type() + "`"
if f.Value.Type() != "bool" || (f.Value.Type() == "bool" && f.DefValue == "true") {
ftype = "`" + f.Value.Type() + "`"
}
var defval string var defval string
if v, ok := f.Annotations[annotation.DefaultValue]; ok && len(v) > 0 { if v, ok := f.Annotations[annotation.DefaultValue]; ok && len(v) > 0 {

Просмотреть файл

@ -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`) | | [`-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 | | `--iidfile` | `string` | | Write the image ID to the file |
| `--label` | `stringArray` | | Set metadata for an image | | `--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 | | `--network` | `string` | `default` | Set the networking mode for the `RUN` instructions during build |
| `-o`, `--output` | `stringArray` | | Output destination (format: `type=local,dest=path`) | | `-o`, `--output` | `stringArray` | | Output destination (format: `type=local,dest=path`) |
| `--platform` | `stringArray` | local | Set target platform for build | | `--platform` | `stringArray` | local | Set target platform for build |
| `--push` | | | Shorthand for `--output=type=registry` | | `--push` | `bool` | | Shorthand for `--output=type=registry` |
| `-q`, `--quiet` | | | Suppress the build output and print image ID on success | | `-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`) | | `--secret` | `stringArray` | | Secret file to expose to the build (format: `id=mysecret,src=/local/secret`) |
| `--shm-size` | `string` | | Size of `/dev/shm` | | `--shm-size` | `string` | | Size of `/dev/shm` |
| `--ssh` | `stringArray` | | SSH agent socket or keys to expose to the build<br>format: `default\|<id>[=<socket>\|<key>[,<key>]]` | | `--ssh` | `stringArray` | | SSH agent socket or keys to expose to the build<br>format: `default\|<id>[=<socket>\|<key>[,<key>]]` |