@@ 60,11 60,11 @@ func main() {
log.Fatal(error)
}
cron := gocron.NewScheduler(time.UTC)
- cron.Every(5).Minutes().Do(mastodonTask(c, feedURL))
+ cron.Every(5).Minutes().Do(mastodonTask, c, feedURL)
cron.StartBlocking()
}
-func mastodonTask(c *mastodon.Client, feedURL string) bool {
+func mastodonTask(c *mastodon.Client, feedURL string) {
feeds := parseFeed(feedURL)
@@ 75,7 75,7 @@ func mastodonTask(c *mastodon.Client, feedURL string) bool {
postToot(c, &theToot)
log.Printf("Posted video at: %s", time.Now().String())
- return true
+
}
func postToot(c *mastodon.Client, theToot *mastodon.Toot) {