From d01fbb8ce8eb7e1c361bc80931a7c3d1a3f2d103 Mon Sep 17 00:00:00 2001 From: an Date: Wed, 21 Aug 2019 18:24:26 +0200 Subject: [PATCH] fix --- modules/rss.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/modules/rss.go b/modules/rss.go index ab23b99..2aaad5d 100644 --- a/modules/rss.go +++ b/modules/rss.go @@ -74,13 +74,14 @@ func rssItemHandler(feed *gorss.Feed, ch *gorss.Channel, newitems []*gorss.Item) return } for _, ni := range newitems { - ti := ni.Title - if len(ti) > 80 { - runes := []rune(ti) - short := string(runes[0:80]) - } else { - short := ti - } + ti := ni.Title + short := "" + if len(ti) > 80 { + runes := []rune(ti) + short = string(runes[0:80]) + } else { + short = ti + } SayCh <- fmt.Sprintf("%s\n[RSS] %v - %v", *rssChannel, short, ni.Links[0].Href) } }