From 6b3933282e3aa9803636b2ba580aced5c202eaa9 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Tue, 24 Jan 2023 12:40:32 +0100 Subject: Refactor URL construction a bit BlogHTTPURL and BlogGeminiURL are now used specifically to construct absolute URLs to their respective endpoints. --- src/http/feed.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/http/feed.go') diff --git a/src/http/feed.go b/src/http/feed.go index 918eb86..deaeb80 100644 --- a/src/http/feed.go +++ b/src/http/feed.go @@ -3,7 +3,6 @@ package http import ( "fmt" "net/http" - "path/filepath" "github.com/gorilla/feeds" "github.com/mediocregopher/blog.mediocregopher.com/srv/http/apiutil" @@ -54,7 +53,7 @@ func (a *api) renderFeedHandler() http.Handler { feed.Updated = post.LastUpdatedAt } - postURL := publicURL + filepath.Join("/posts", post.ID) + postURL := a.postURL(post.ID, true) item := &feeds.Item{ Title: post.Title, -- cgit v1.2.3