Open Tang8330 opened 1 year ago
I came here to report the same problem and propose a similar fix. @Tang8330 were you able to find a workaround so you can reliably send your transmissions? Otherwise calls to transmission.ParseContent(...)
will randomly fail. (Due to a map's keys always being returned in an "indeterminate" ordering.)
It seems like the only(?) workaround for using stored templates with Sparkpost is to simply not use this Golang library?
@chrsmith I fixed the problem on my fork and we're using that in Production.
Current logic is flawed in 2 ways.
map[string]string
types. Logic would early return when it foundtemplate_id
based on [1], but because iterating keys over a map is not deterministic, it would fetchCC
and then err out because it'smap[string]string
notstring