Re:Show HN: Made a new notification tool and I'm looking for...
by cmaster11 on Friday May 17, 2019 @03:31AM
(#19937198)
Cool!!
You can access arrays with `{{ index .myArray 0 }}` ( https://notify17.net/docs/templates/#arrays ). Notify17 uses golang templates :)
Re:Show HN: Made a new notification tool and I'm looking for...
by cyberferret on Friday May 17, 2019 @05:07AM
(#19937695)
Can confirm that works. :) I am not familiar with GoLang, but using {{ (index .Records 0).Sns.Message }} works (for anyone who may be interested in the solution).
The EB notification JSON body that gets POSTed by the SNS Topic contains a Record[] structure with the messages, and when I try to setup {{ Records[0].Sns.Message }} in the template, I am getting a "template: notification-content:2: unexpected bad character U+005B '[' in command" error.