Fix source errors
* Dilbert Image * GoComics List
This commit is contained in:
5
main.go
5
main.go
@@ -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) {
|
||||
|
Reference in New Issue
Block a user