From f92cefd85338a06700c1e4854ccca43dc4417bbf Mon Sep 17 00:00:00 2001 From: tachiniererin <49161598+tachiniererin@users.noreply.github.com> Date: Wed, 14 Aug 2019 21:03:31 +0200 Subject: [PATCH] Add time and URL to search output (#6) --- search.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/search.go b/search.go index 71505e0..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,6 +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.Format(time.RFC822)) + fmt.Println("URL:", s.URL) fmt.Println() }