Fix source errors

* Dilbert Image
* GoComics List
This commit is contained in:
2018-12-27 08:37:44 -06:00
parent 5b76117cf8
commit 5096f3522e
10 changed files with 81 additions and 27 deletions

View File

@@ -64,8 +64,7 @@ func main() {
} else if len(os.Args) > 1 {
switch os.Args[1] {
case "--test":
//d, _ := getXKCDFeedDesc(time.Now())
fmt.Println(buildRssFeed("09af5fda-43dc-416e-93ad-cc050e0c098a"))
fmt.Println(buildRssFeed("30f14e57-6500-443c-8c77-f352788eacb0"))
done()
case "--list-comics":
comics := m.GetAllComics()
@@ -115,7 +114,7 @@ func main() {
http.Handle("/", r)
chain := alice.New(loggingHandler).Then(r)
// Save changes to the DB every 5 minutes
// Refresh the DB at 2 AM
go func() {
for {
if m.Site.LastSave.IsZero() || (time.Now().Day() != m.Site.LastSave.Day() && time.Now().Hour() == 2) {