Adding ability to output to stdout instead of Telegram.
This commit is contained in:
@ -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.")
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user