From 0b38c46d3779b3f405f2b2f416d767b1a204429a Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Tue, 25 Feb 2020 13:29:09 -0500 Subject: [PATCH] avoid empty strings --- fun.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fun.go b/fun.go index b6e375c..bba2c6e 100644 --- a/fun.go +++ b/fun.go @@ -298,6 +298,9 @@ func grapevine(mentions []Mention) []string { func grapeape(s string) []Mention { var mentions []Mention for _, m := range strings.Split(s, " ") { + if m == "" { + continue + } where := gofish(m) if where != "" { mentions = append(mentions, Mention{Who: m, Where: where})