node to page: Fix the Page copy()

By embeding the init sync.Once var in a pointer so we can reset it when we copy the page.

Updates #2297
This commit is contained in:
Bjørn Erik Pedersen
2016-11-16 20:32:38 +01:00
parent 62e9e7e6ba
commit 99d11386a7
6 changed files with 32 additions and 30 deletions

View File

@@ -1269,7 +1269,7 @@ func TestIndexPageSimpleMethods(t *testing.T) {
{func(n *Page) bool { return n.Now().Unix() == time.Now().Unix() }},
} {
n := &Page{Kind: KindHome}
n := &Page{pageInit: &pageInit{}, Kind: KindHome}
n.RSSLink = "rssLink"
if !this.assertFunc(n) {