func newTotalElement() extension.Element { t := atom.NewBasicElement(nil) t.Content = xmlutils.NewElement("total", "", atom.IsValidLength) return t }
func NewTestThrEntry(links []*atom.Link, total, href, ref, typ, source string) *atom.Entry { e := atom.NewEntry() if href != "" || ref != "" || typ != "" || source != "" { inreplyto := newInReplyTo() inreplyto.Href.Value = href inreplyto.Ref.Value = ref inreplyto.Type.Value = typ inreplyto.Source.Value = source e.Extension.Store.Add(_inreplyto, inreplyto) } if total != "" { t := atom.NewBasicElement(nil) t.Content.Value = total e.Extension.Store.Add(_total, t) } e.Links = links return e }