Last active
May 13, 2019 17:48
-
-
Save dbridges/3be611de68465fd9202d3005db0a157e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func main() { | |
// Fetch and filter the feeds | |
feeds := fetchFeeds(feedURLs) | |
feeds = filterFeeds(feeds) | |
if len(feeds) == 0 { | |
return | |
} | |
// Render the feeds to an HTML string | |
t := loadTemplate() | |
writer := &strings.Builder{} | |
err := t.Execute(writer, feeds) | |
if err != nil { | |
log.Fatalln(err) | |
} | |
// Email the HTML out | |
err = mail(writer.String()) | |
if err != nil { | |
log.Fatalln(err) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment