We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
func (m *Message) AddVariable(variable string, value interface{}) error { if m.variables == nil { m.variables = make(map[string]string) } j, err := json.Marshal(value) if err != nil { return err } encoded := string(j) v, err := strconv.Unquote(encoded) if err != nil { v = encoded } m.variables[variable] = v return nil }
Doesn't work for boolean values or numbers (non string values, as they don't appear as ""foo"")
Therefore, in my mailgun template which uses {{#if }} handlebars, I cannot check the boolean value, as it is sent as a string
The text was updated successfully, but these errors were encountered:
Hi, @IvanWillsBI.
There is a test for boolean:
mailgun-go/messages_test.go
Line 389 in 88d455c
""foo""
NOTES for myself: #112 https://documentation.mailgun.com/docs/mailgun/user-manual/sending-messages/#handlebars https://handlebarsjs.com/guide/builtin-helpers.html#if
Sorry, something went wrong.
No branches or pull requests
Doesn't work for boolean values or numbers (non string values, as they don't appear as ""foo"")
Therefore, in my mailgun template which uses {{#if }} handlebars, I cannot check the boolean value, as it is sent as a string
The text was updated successfully, but these errors were encountered: