0
0
Fork 0
mirror of https://github.com/crazy-max/diun.git synced 2025-04-11 06:01:21 +00:00

Small typo

This commit is contained in:
CrazyMax 2020-06-26 19:05:13 +02:00
parent 3abfe5c8e9
commit 6f845208d6
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
3 changed files with 5 additions and 1 deletions
CHANGELOG.md
docs/assets/notif
internal/notif/discord

View file

@ -1,5 +1,9 @@
# Changelog
## 4.1.1 (2020/06/26)
* Small typo
## 4.1.0 (2020/06/26)
* Discord notifications (#110 #111)

Binary file not shown.

Before

(image error) Size: 16 KiB

After

(image error) Size: 16 KiB

View file

@ -53,7 +53,7 @@ func (c *Client) Send(entry model.NotifEntry) error {
}
var textBuf bytes.Buffer
textTpl := template.Must(template.New("discord").Parse(fmt.Sprintf(`Docker tag %s which you subscribed to through **{{ .Entry.Provider }}** provider has been {{ if (eq .Entry.Status "new") }}newly added{{ else }}updated{{ end }} on **myserver**.`, tagTpl)))
textTpl := template.Must(template.New("discord").Parse(fmt.Sprintf(`Docker tag %s which you subscribed to through **{{ .Entry.Provider }}** provider has been {{ if (eq .Entry.Status "new") }}newly added{{ else }}updated{{ end }} on **{{ .Meta.Hostname }}**.`, tagTpl)))
if err := textTpl.Execute(&textBuf, struct {
Meta model.Meta
Entry model.NotifEntry