From 2717a968130af9199250d257cb12e937b5fe8d15 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Tue, 23 Jan 2018 17:56:07 +0100 Subject: cleanup --- href.go | 8 ++++---- href_test.go | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/href.go b/href.go index 2cd7677..6db1347 100644 --- a/href.go +++ b/href.go @@ -10,9 +10,9 @@ import ( ) var ( - errNotHTML = errors.New("not HTML") - errTooBig = errors.New("content too big") - errNotTitle = errors.New("no Title") + errNotHTML = errors.New("not HTML") + errTooBig = errors.New("content too big") + errNoTitle = errors.New("no title") ) func title(n *html.Node) (string, error) { @@ -28,7 +28,7 @@ func title(n *html.Node) (string, error) { return t, nil } } - return "", errNotTitle + return "", errNoTitle } func getTitle(uri string) (string, error) { diff --git a/href_test.go b/href_test.go index 7ce72a1..fe69810 100644 --- a/href_test.go +++ b/href_test.go @@ -10,7 +10,6 @@ func TestTitle(t *testing.T) { {`http://www.opennet.ru`, `Проект OpenNet - всё, что связано с открытым ПО, открытыми технологиями, Linux, BSD и Unix`}, {`http://www.openbsd.org`, `OpenBSD`}, {`http://undeadly.org`, `OpenBSD Journal: A resource for the OpenBSD community`}, - {`https://github.com/dls/house/blob/master/kernel/SimpleExec.hs`, `house/SimpleExec.hs at master · dls/house · GitHub`}, } for _, tc := range testCases { t.Run(tc.url, func(t *testing.T) { -- cgit v1.2.3