diff options
author | Dimitri Sokolyuk <demon@dim13.org> | 2016-03-21 22:00:46 +0100 |
---|---|---|
committer | Dimitri Sokolyuk <demon@dim13.org> | 2016-03-21 22:00:46 +0100 |
commit | 06d7409a46f77692a2f5c4e135ec5ba2d24d019c (patch) | |
tree | e76c6ccfa525924fd9f67488018be36f0884a340 /href.go | |
parent | 460bac780774bb582153313d06f67f331d18506f (diff) |
Make lint a little bit happier
Diffstat (limited to 'href.go')
-rw-r--r-- | href.go | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -14,9 +14,9 @@ import ( ) var ( - notHTML = errors.New("not HTML content") - tooBig = errors.New("content too big") - iconvErr = errors.New("charset converter error") + errNotHTML = errors.New("not HTML content") + errTooBig = errors.New("content too big") + errIconv = errors.New("charset converter error") ) const ( @@ -60,16 +60,16 @@ func FetchTitle(uri string) (string, error) { ct := resp.Header.Get("Content-Type") if !strings.HasPrefix(ct, "text/html") { - return "", notHTML + return "", errNotHTML } if resp.ContentLength > 8*MB { - return "", tooBig + return "", errTooBig } r, err := charset.NewReader(resp.Body, ct) if err != nil { - return "", iconvErr + return "", errIconv } doc, err := html.Parse(r) |