From 339565831e284e285d95a908fa5dac3f6f8648bd Mon Sep 17 00:00:00 2001 From: Elen Eisendle Date: Wed, 14 Aug 2019 12:32:38 +0200 Subject: [PATCH] Print URL and time (as RFC822) in new lines --- search.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/search.go b/search.go index d0825e5..a06b404 100644 --- a/search.go +++ b/search.go @@ -5,6 +5,7 @@ import ( "fmt" "math" "strings" + "time" mastodon "github.com/mattn/go-mastodon" "github.com/muesli/goprogressbar" @@ -49,7 +50,8 @@ func search(token string) error { for _, s := range statuses { if strings.Contains(strings.ToLower(cleanupContent(s.Content)), token) { fmt.Println("\nFound toot:", cleanupContent(s.Content)) - fmt.Println("Date: ", s.CreatedAt, ", URL: ", s.URL) + fmt.Println("Date:", s.CreatedAt.Format(time.RFC822)) + fmt.Println("URL:", s.URL) fmt.Println() }