node to page: Handle URLs

This includes removing the error return value from Permalink and RelPermalink.

We ignore that error all over the place, so we might as well remove it.

Updates #2297
This commit is contained in:
Bjørn Erik Pedersen
2016-11-15 10:43:49 +01:00
parent c8d3124dde
commit 524eb16686
8 changed files with 105 additions and 63 deletions

View File

@@ -81,20 +81,14 @@ func TestPermalink(t *testing.T) {
})
}
u, err := p.Permalink()
if err != nil {
t.Errorf("Test %d: Unable to process permalink: %s", i, err)
}
u := p.Permalink()
expected := test.expectedAbs
if u != expected {
t.Errorf("Test %d: Expected abs url: %s, got: %s", i, expected, u)
}
u, err = p.RelPermalink()
if err != nil {
t.Errorf("Test %d: Unable to process permalink: %s", i, err)
}
u = p.RelPermalink()
expected = test.expectedRel
if u != expected {