repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
6866c6a
parent
6d5b4e3
author
Eric Bower
date
2024-04-01 15:31:53 +0000 UTC
chore(feeds): cleanup
1 files changed,  +8, -8
M feeds/cron.go
+8, -8
 1@@ -78,21 +78,21 @@ func itemToTemplate(item *gofeed.Item) *FeedItemTmpl {
 2 func digestOptionToTime(lastDigest time.Time, interval string) time.Time {
 3 	day := 24 * time.Hour
 4 	if interval == "10min" {
 5-		return  lastDigest.Add(10 * time.Minute)
 6+		return lastDigest.Add(10 * time.Minute)
 7 	} else if interval == "1hour" {
 8-		return  lastDigest.Add(1 * time.Hour)
 9+		return lastDigest.Add(1 * time.Hour)
10 	} else if interval == "6hour" {
11-		return  lastDigest.Add(6 * time.Hour)
12+		return lastDigest.Add(6 * time.Hour)
13 	} else if interval == "12hour" {
14-		return  lastDigest.Add(12 * time.Hour)
15+		return lastDigest.Add(12 * time.Hour)
16 	} else if interval == "1day" || interval == "" {
17-		return  lastDigest.Add(1 * day)
18+		return lastDigest.Add(1 * day)
19 	} else if interval == "7day" {
20-		return  lastDigest.Add(7 * day)
21+		return lastDigest.Add(7 * day)
22 	} else if interval == "30day" {
23-		return  lastDigest.Add(30 * day)
24+		return lastDigest.Add(30 * day)
25 	} else {
26-		return lastDigest 
27+		return lastDigest
28 	}
29 }
30