Adding ability to output to stdout instead of Telegram.

This commit is contained in:
Matt Burchett
2020-09-23 10:13:14 -05:00
parent cd44fb971d
commit 42439d61b4
3 changed files with 21 additions and 4 deletions

View File

@ -46,3 +46,14 @@ func TelegramPost(config config.Config, titles []string) error {
return err
}
// StdoutPost will relay the titles out to stdout.
func StdoutPost(titles []string) {
if len(titles) != 0 {
for _, title := range titles {
fmt.Println(title)
}
} else {
fmt.Println("There are no titles. Nothing to display.")
}
}