mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-12-20 03:41:16 +00:00
[docs] Allow to comment default value for actor docs
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
8a40f105e3
commit
3c00298760
2 changed files with 6 additions and 5 deletions
|
@ -20,23 +20,23 @@ All these actions can be executed by your bot as soon as you add them to rules.
|
||||||
# Optional: {{ .Optional }}
|
# Optional: {{ .Optional }}
|
||||||
{{- if eq .Type "bool" }}
|
{{- if eq .Type "bool" }}
|
||||||
# Type: {{ .Type }}{{ if .SupportTemplate }} (Supports Templating){{ end }}
|
# Type: {{ .Type }}{{ if .SupportTemplate }} (Supports Templating){{ end }}
|
||||||
{{ .Key }}: {{ eq .Default "true" }}
|
{{ .Key }}: {{ eq .Default "true" }}{{ if .DefaultComment }} # {{ .DefaultComment }}{{ end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if eq .Type "duration" }}
|
{{- if eq .Type "duration" }}
|
||||||
# Type: {{ .Type }}{{ if .SupportTemplate }} (Supports Templating){{ end }}
|
# Type: {{ .Type }}{{ if .SupportTemplate }} (Supports Templating){{ end }}
|
||||||
{{ .Key }}: {{ if eq .Default "" }}0s{{ else }}{{ .Default }}{{ end }}
|
{{ .Key }}: {{ if eq .Default "" }}0s{{ else }}{{ .Default }}{{ end }}{{ if .DefaultComment }} # {{ .DefaultComment }}{{ end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if eq .Type "int64" }}
|
{{- if eq .Type "int64" }}
|
||||||
# Type: {{ .Type }}{{ if .SupportTemplate }} (Supports Templating){{ end }}
|
# Type: {{ .Type }}{{ if .SupportTemplate }} (Supports Templating){{ end }}
|
||||||
{{ .Key }}: {{ if eq .Default "" }}0{{ else }}{{ .Default }}{{ end }}
|
{{ .Key }}: {{ if eq .Default "" }}0{{ else }}{{ .Default }}{{ end }}{{ if .DefaultComment }} # {{ .DefaultComment }}{{ end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if eq .Type "string" }}
|
{{- if eq .Type "string" }}
|
||||||
# Type: {{ .Type }}{{ if .SupportTemplate }} (Supports Templating){{ end }}
|
# Type: {{ .Type }}{{ if .SupportTemplate }} (Supports Templating){{ end }}
|
||||||
{{ .Key }}: "{{ .Default }}"
|
{{ .Key }}: "{{ .Default }}"{{ if .DefaultComment }} # {{ .DefaultComment }}{{ end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if eq .Type "stringslice" }}
|
{{- if eq .Type "stringslice" }}
|
||||||
# Type: array of strings{{ if .SupportTemplate }} (Supports Templating in each string){{ end }}
|
# Type: array of strings{{ if .SupportTemplate }} (Supports Templating in each string){{ end }}
|
||||||
{{ .Key }}: []
|
{{ .Key }}: []{{ if .DefaultComment }} # {{ .DefaultComment }}{{ end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
|
|
|
@ -11,6 +11,7 @@ type (
|
||||||
|
|
||||||
ActionDocumentationField struct {
|
ActionDocumentationField struct {
|
||||||
Default string `json:"default"`
|
Default string `json:"default"`
|
||||||
|
DefaultComment string `json:"default_comment"`
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
Key string `json:"key"`
|
Key string `json:"key"`
|
||||||
Long bool `json:"long"`
|
Long bool `json:"long"`
|
||||||
|
|
Loading…
Reference in a new issue