From 6656bb5b79a5623047f58458564fdc0a1f669f7e Mon Sep 17 00:00:00 2001 From: bmf-san Date: Wed, 17 Apr 2024 10:04:06 +0900 Subject: [PATCH] [update] rename publish to public --- app/controller/feed_controller.go | 6 +++--- app/model/feed.go | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/controller/feed_controller.go b/app/controller/feed_controller.go index b4cfd71..aec5d4b 100644 --- a/app/controller/feed_controller.go +++ b/app/controller/feed_controller.go @@ -67,8 +67,8 @@ func (fc *FeedController) Index() http.Handler { Href: u, }, ID: u, - Updated: p.UpdatedAt, - Published: p.CreatedAt, + UpdatedAt: p.UpdatedAt, + CreatedAt: p.CreatedAt, Author: model.FeedAuthor{ Name: p.Admin.Name, }, @@ -86,7 +86,7 @@ func (fc *FeedController) Index() http.Handler { Link: model.FeedLink{ Href: url, }, - Updated: posts[len(posts)-1].UpdatedAt, + UpdatedAt: posts[len(posts)-1].UpdatedAt, Author: model.FeedAuthor{ Name: "bmf_san", }, diff --git a/app/model/feed.go b/app/model/feed.go index 76c9253..1b3803d 100644 --- a/app/model/feed.go +++ b/app/model/feed.go @@ -7,14 +7,14 @@ import ( // A Feed represents the singular of feed. type Feed struct { - XMLName xml.Name `xml:"http://www.w3.org/2005/Atom feed"` - Title string `xml:"title"` - Subtitle string `xml:"subtitle"` - Link FeedLink `xml:"link"` - Updated time.Time `xml:"updated"` - Author FeedAuthor `xml:"author"` - ID string `xml:"id"` - Entries []FeedEntry `xml:"entry"` + XMLName xml.Name `xml:"http://www.w3.org/2005/Atom feed"` + Title string `xml:"title"` + Subtitle string `xml:"subtitle"` + Link FeedLink `xml:"link"` + UpdatedAt time.Time `xml:"updatedat"` + Author FeedAuthor `xml:"author"` + ID string `xml:"id"` + Entries []FeedEntry `xml:"entry"` } // An FeedEntry represents the singular of entry. @@ -22,8 +22,8 @@ type FeedEntry struct { Title string `xml:"title"` Link FeedLink `xml:"link"` ID string `xml:"id"` - Updated time.Time `xml:"updated"` - Published time.Time `xml:"published"` + UpdatedAt time.Time `xml:"updatedat"` + CreatedAt time.Time `xml:"createdat"` Author FeedAuthor `xml:"author"` Content FeedContent `xml:"content"` }