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.")
}
}

View File

@ -134,7 +134,7 @@ func DeleteFiles(delete bool, files []string) error {
fmt.Printf("Removing %v\n", i)
err = os.RemoveAll(i)
if err != nil {
log.Fatal(err)
log.Println(err)
}
}
}