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

@ -560,7 +560,6 @@ func TestHomeNodeMenu(t *testing.T) {
s := setupMenuTests(t, menuPageSources)
home := s.getPage(KindHome)
homeMenuEntry := &MenuEntry{Name: home.Title, URL: home.URL()}
for i, this := range []struct {
@ -583,7 +582,7 @@ func TestHomeNodeMenu(t *testing.T) {
if isMenuCurrent != this.isMenuCurrent {
fmt.Println("isMenuCurrent", isMenuCurrent)
fmt.Printf("this: %#v\n", this)
t.Errorf("[%d] Wrong result from IsMenuCurrent: %v for %q", i, isMenuCurrent, this.menu)
t.Errorf("[%d] Wrong result from IsMenuCurrent: %v for %q", i, isMenuCurrent, this.menuItem)
}
if hasMenuCurrent != this.hasMenuCurrent {