diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-04-07 20:03:03 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-04-08 17:55:23 +0200 |
commit | 1c3c148b38c1e66860d33fee0e2114ca4e004d05 (patch) | |
tree | 090ac534668e7d63418ee7374487ba5ccbd1ccc9 /hugolib/site_test.go | |
parent | 16ad628114a9357a782b290f0cec69c24e473751 (diff) |
hugolib: Un-export internal Site-methods
These are obviously internal and for the most part undocumented, creating lots of GoLint warnings.
See #1160
See #2014
Diffstat (limited to 'hugolib/site_test.go')
-rw-r--r-- | hugolib/site_test.go | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/hugolib/site_test.go b/hugolib/site_test.go index dd52b6d26..8cbe35d44 100644 --- a/hugolib/site_test.go +++ b/hugolib/site_test.go @@ -80,7 +80,7 @@ func TestReadPagesFromSourceWithEmptySource(t *testing.T) { d := time.Second * 2 ticker := time.NewTicker(d) select { - case err = <-s.ReadPagesFromSource(): + case err = <-s.readPagesFromSource(): break case <-ticker.C: err = fmt.Errorf("ReadPagesFromSource() never returns in %s", d.String()) @@ -92,15 +92,15 @@ func TestReadPagesFromSourceWithEmptySource(t *testing.T) { } func createAndRenderPages(t *testing.T, s *Site) { - if err := s.CreatePages(); err != nil { + if err := s.createPages(); err != nil { t.Fatalf("Unable to create pages: %s", err) } - if err := s.BuildSiteMeta(); err != nil { + if err := s.buildSiteMeta(); err != nil { t.Fatalf("Unable to build site metadata: %s", err) } - if err := s.RenderPages(); err != nil { + if err := s.renderPages(); err != nil { t.Fatalf("Unable to render pages. %s", err) } } @@ -254,7 +254,7 @@ func TestDraftAndFutureRender(t *testing.T) { s.initializeSiteInfo() - if err := s.CreatePages(); err != nil { + if err := s.createPages(); err != nil { t.Fatalf("Unable to create pages: %s", err) } return s @@ -433,8 +433,8 @@ func doTestShouldAlwaysHaveUglyURLs(t *testing.T, uglyURLs bool) { "sitemap.xml", "<root>SITEMAP</root>") createAndRenderPages(t, s) - s.RenderHomePage() - s.RenderSitemap() + s.renderHomePage() + s.renderSitemap() var expectedPagePath string if uglyURLs { @@ -522,7 +522,7 @@ func doTestSectionNaming(t *testing.T, canonify, uglify, pluralize bool) { "_default/list.html", "{{ .Title }}") createAndRenderPages(t, s) - s.RenderSectionLists() + s.renderSectionLists() tests := []struct { doc string @@ -640,15 +640,15 @@ func TestAbsURLify(t *testing.T) { s.prepTemplates("blue/single.html", templateWithURLAbs) - if err := s.CreatePages(); err != nil { + if err := s.createPages(); err != nil { t.Fatalf("Unable to create pages: %s", err) } - if err := s.BuildSiteMeta(); err != nil { + if err := s.buildSiteMeta(); err != nil { t.Fatalf("Unable to build site metadata: %s", err) } - if err := s.RenderPages(); err != nil { + if err := s.renderPages(); err != nil { t.Fatalf("Unable to render pages. %s", err) } @@ -737,11 +737,11 @@ func TestOrderedPages(t *testing.T) { } s.initializeSiteInfo() - if err := s.CreatePages(); err != nil { + if err := s.createPages(); err != nil { t.Fatalf("Unable to create pages: %s", err) } - if err := s.BuildSiteMeta(); err != nil { + if err := s.buildSiteMeta(); err != nil { t.Fatalf("Unable to build site metadata: %s", err) } @@ -811,11 +811,11 @@ func TestGroupedPages(t *testing.T) { } s.initializeSiteInfo() - if err := s.CreatePages(); err != nil { + if err := s.createPages(); err != nil { t.Fatalf("Unable to create pages: %s", err) } - if err := s.BuildSiteMeta(); err != nil { + if err := s.buildSiteMeta(); err != nil { t.Fatalf("Unable to build site metadata: %s", err) } @@ -1001,11 +1001,11 @@ func TestWeightedTaxonomies(t *testing.T) { } s.initializeSiteInfo() - if err := s.CreatePages(); err != nil { + if err := s.createPages(); err != nil { t.Fatalf("Unable to create pages: %s", err) } - if err := s.BuildSiteMeta(); err != nil { + if err := s.buildSiteMeta(); err != nil { t.Fatalf("Unable to build site metadata: %s", err) } @@ -1075,7 +1075,7 @@ func setupLinkingMockSite(t *testing.T) *Site { site.initializeSiteInfo() - if err := site.CreatePages(); err != nil { + if err := site.createPages(); err != nil { t.Fatalf("Unable to create pages: %s", err) } |