From cc7394cd10f7b8ca16676d5e1b042908a4862d86 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 18 Jul 2015 17:18:21 +0200 Subject: Limit title length --- href.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'href.go') diff --git a/href.go b/href.go index 811a963..f661e50 100644 --- a/href.go +++ b/href.go @@ -43,5 +43,9 @@ func FetchTitle(url string) (string, error) { title := findTitle(doc) cache[url] = title + if len(title) > 80 { + title = title[:80] + " ..." + } + return title, nil } -- cgit v1.2.3