summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2018-01-23 17:56:07 +0100
committerDimitri Sokolyuk <demon@dim13.org>2018-01-23 17:56:07 +0100
commit2717a968130af9199250d257cb12e937b5fe8d15 (patch)
tree9912012c2471df907a390e5a6be16341184234b7
parentd56b9e1b2533a87d23b2a68282b016a89dc963e9 (diff)
cleanup
-rw-r--r--href.go8
-rw-r--r--href_test.go1
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) {