mirror of https://github.com/docker/docs.git
Merge pull request #18207 from dvdksn/fix-cli-default-values
fix: ignore empty default values for cli flags
This commit is contained in:
commit
d0134bcfb8
|
@ -85,7 +85,12 @@
|
|||
<tr>
|
||||
<td>{{ with .option }}<code>--{{ . }}</code>{{ end }}</td>
|
||||
<td>{{ with .shorthand }}<code>-{{ . }}</code>{{ end }}</td>
|
||||
<td>{{ with .default_value }}<code>{{ . }}</code>{{ end }}</td>
|
||||
{{ $skipDefault := `[],map[],false,0,0s,default,'',""` }}
|
||||
<td>
|
||||
{{ with .default_value }}
|
||||
{{ cond (in $skipDefault .) "" (printf "<code>%s</code>" . | safeHTML) }}
|
||||
{{ end }}
|
||||
</td>
|
||||
<td>
|
||||
{{ with .min_api_version }}
|
||||
{{ partial "components/badge.html" (dict "color" "blue" "content" (printf "API %s+" .)) }}
|
||||
|
|
Loading…
Reference in New Issue