1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-31 18:31:01 +00:00

Rename internal url package to avoid overlap with net/url

This commit is contained in:
Frédéric Guillot 2023-08-13 19:09:01 -07:00
parent 9f465fd70d
commit e5d9f2f5a0
23 changed files with 74 additions and 75 deletions

View file

@ -14,7 +14,7 @@ import (
"miniflux.app/v2/internal/model"
"miniflux.app/v2/internal/reader/date"
"miniflux.app/v2/internal/reader/sanitizer"
"miniflux.app/v2/internal/url"
"miniflux.app/v2/internal/urllib"
)
type rdfFeed struct {
@ -30,7 +30,7 @@ func (r *rdfFeed) Transform(baseURL string) *model.Feed {
feed := new(model.Feed)
feed.Title = sanitizer.StripTags(r.Title)
feed.FeedURL = baseURL
feed.SiteURL, err = url.AbsoluteURL(baseURL, r.Link)
feed.SiteURL, err = urllib.AbsoluteURL(baseURL, r.Link)
if err != nil {
feed.SiteURL = r.Link
}
@ -44,7 +44,7 @@ func (r *rdfFeed) Transform(baseURL string) *model.Feed {
if entry.URL == "" {
entry.URL = feed.SiteURL
} else {
entryURL, err := url.AbsoluteURL(feed.SiteURL, entry.URL)
entryURL, err := urllib.AbsoluteURL(feed.SiteURL, entry.URL)
if err == nil {
entry.URL = entryURL
}