mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user