avoid empty strings

This commit is contained in:
Ted Unangst 2020-02-25 13:29:09 -05:00
parent 5af0737506
commit 0b38c46d37

3
fun.go
View file

@ -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})