diff options
author | Dimitri Sokolyuk <demon@dim13.org> | 2015-07-18 17:18:21 +0200 |
---|---|---|
committer | Dimitri Sokolyuk <demon@dim13.org> | 2015-07-18 17:18:21 +0200 |
commit | cc7394cd10f7b8ca16676d5e1b042908a4862d86 (patch) | |
tree | 3589a0238d6bc8596443de14b23d71d686a744d0 /href.go | |
parent | bcd472b309ac932031932da0fa7637e2f858dd1e (diff) |
Limit title length
Diffstat (limited to 'href.go')
-rw-r--r-- | href.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 } |