mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-09-07 20:39:07 +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
@ -20,23 +20,23 @@ All these actions can be executed by your bot as soon as you add them to rules.
|
||||
# Optional: {{ .Optional }}
|
||||
{{- if eq .Type "bool" }}
|
||||
# Type: {{ .Type }}{{ if .SupportTemplate }} (Supports Templating){{ end }}
|
||||
{{ .Key }}: {{ eq .Default "true" }}
|
||||
{{ .Key }}: {{ eq .Default "true" }}{{ if .DefaultComment }} # {{ .DefaultComment }}{{ end }}
|
||||
{{- end }}
|
||||
{{- if eq .Type "duration" }}
|
||||
# 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 }}
|
||||
{{- if eq .Type "int64" }}
|
||||
# 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 }}
|
||||
{{- if eq .Type "string" }}
|
||||
# Type: {{ .Type }}{{ if .SupportTemplate }} (Supports Templating){{ end }}
|
||||
{{ .Key }}: "{{ .Default }}"
|
||||
{{ .Key }}: "{{ .Default }}"{{ if .DefaultComment }} # {{ .DefaultComment }}{{ end }}
|
||||
{{- end }}
|
||||
{{- if eq .Type "stringslice" }}
|
||||
# Type: array of strings{{ if .SupportTemplate }} (Supports Templating in each string){{ end }}
|
||||
{{ .Key }}: []
|
||||
{{ .Key }}: []{{ if .DefaultComment }} # {{ .DefaultComment }}{{ end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
|
@ -11,6 +11,7 @@ type (
|
||||
|
||||
ActionDocumentationField struct {
|
||||
Default string `json:"default"`
|
||||
DefaultComment string `json:"default_comment"`
|
||||
Description string `json:"description"`
|
||||
Key string `json:"key"`
|
||||
Long bool `json:"long"`
|
||||
|
Loading…
Reference in New Issue
Block a user