for _, author := range item.Authors {
fd.WriteString("X-Author: " + author.Name + "\n")
}
- for _, cat := range item.Categories {
- fd.WriteString("X-Category: " + cat + "\n")
+ if len(item.Categories) > 0 {
+ fd.WriteString("X-Categories: " + strings.Join(item.Categories, ", ") + "\n")
}
fd.WriteString("\n")
what = base64.StdEncoding.EncodeToString([]byte(what))
Content-Type: text/html; charset=utf-8
[X-URL: link presented in the item] (maybe multiple)
[X-Author: author's name] (maybe multiple)
-[X-Category: item's category] (maybe multiple)
+[X-Categories: item's comma separated categories]
Base64-encoded item's content. That is HTML as a rule.
@end verbatim