gofmt
Jes Olson j3s@c3f.net
Sun, 17 Jul 2022 23:30:32 -0500
1 files changed,
8 insertions(+),
8 deletions(-)
jump to
M
main.go
→
main.go
@@ -3,16 +3,16 @@
import ( "bytes" "fmt" - "time" "html/template" - "sort" "io" "log" "math/rand" "net/http" "os" "path/filepath" + "sort" "strings" + "time" "filippo.io/age" "filippo.io/age/armor"@@ -30,8 +30,8 @@ // data for use in templates. it's useful for it to be
// global since it may need to be available in arbitrary // contexts. maybe that sucks. but idfk! type templateData struct { - Feeds []rss.Feed - TitleWord string + Feeds []rss.Feed + TitleWord string } var data templateData@@ -240,14 +240,14 @@
var posts []rss.Item for _, f := range data.Feeds { for _, i := range f.Items { - posts = append(posts, *i) + posts = append(posts, *i) } } // magick slice sorter by date - sort.Slice(posts, func(i, j int) bool { - return posts[i].Date.After(posts[j].Date) - }) + sort.Slice(posts, func(i, j int) bool { + return posts[i].Date.After(posts[j].Date) + }) // printf the shit for _, p := range posts {