1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-15 18:57:04 +00:00

refactor(misc): fix a handful of TODO

This commit is contained in:
jvoisin 2025-08-08 22:14:22 +02:00 committed by Frédéric Guillot
parent 06cbf1b3b3
commit 485baf9654
9 changed files with 18 additions and 27 deletions

View file

@ -16,11 +16,6 @@ type opmlDocument struct {
Outlines opmlOutlineCollection `xml:"body>outline"`
}
// TODO remove as this is only used in the opml package
func NewOPMLDocument() *opmlDocument {
return &opmlDocument{}
}
type opmlHeader struct {
Title string `xml:"title,omitempty"`
DateCreated string `xml:"dateCreated,omitempty"`

View file

@ -13,7 +13,7 @@ import (
// parse reads an OPML file and returns a SubcriptionList.
func parse(data io.Reader) (subcriptionList, error) {
opmlDocument := NewOPMLDocument()
opmlDocument := &opmlDocument{}
decoder := xml.NewDecoder(data)
decoder.Entity = xml.HTMLEntity
decoder.Strict = false

View file

@ -32,7 +32,7 @@ func serialize(subscriptions subcriptionList) string {
}
func convertSubscriptionsToOPML(subscriptions subcriptionList) *opmlDocument {
opmlDocument := NewOPMLDocument()
opmlDocument := &opmlDocument{}
opmlDocument.Version = "2.0"
opmlDocument.Header.Title = "Miniflux"
opmlDocument.Header.DateCreated = time.Now().Format("Mon, 02 Jan 2006 15:04:05 MST")