-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
format_markdown.tmpl
57 lines (39 loc) · 831 Bytes
/
format_markdown.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# {{ .Header }}
{{- if .LongDescription }}
{{ .LongDescription }}
{{- else if .ShortDescription }}
{{ .ShortDescription }}
{{- end }}
```text
{{ .Name }} [command] [global flags] [command flags]
```
{{- if .GlobalFlagsBlock }}
### Global Flags
```text
{{ .GlobalFlagsBlock -}}
```
{{- end }}
{{- range $group := .Groups }}
### {{ $group.Title }}
{{ range $command := $group.Commands }}
* [{{ $command.Path }}]({{ $command.Path | anchor }})
{{- end }}
{{- end }}
{{- range $group := .Groups }}
# {{ $group.Title }}
{{- range $command := $group.Commands }}
## `{{ $command.Path }}`
{{ $command.Description }}
```text
{{ $command.Usage }}
```
### Command Flags
```text
{{ $command.FlagsBlock -}}
```
{{- end }}
{{- end }}
{{- range $section := .ExtraSections }}
# {{ $section.Title }}
{{ $section.Text }}
{{- end }}