summaryrefslogtreecommitdiffstats
path: root/hugolib
diff options
context:
space:
mode:
authorAlbert Nigmatzianov <albertnigma@gmail.com>2017-03-09 18:18:12 +0500
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-03-09 14:18:12 +0100
commit48120ccfd2138ff2b308081cd7cb9cee033db691 (patch)
treee008e9b8ebccdd897d51ae152c4d2b89215237de /hugolib
parent560ed6e686f19c58dc98af9f47bb35c81f4d7979 (diff)
all: Fix some govet complaints
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/hugo_sites.go1
-rw-r--r--hugolib/page.go4
-rw-r--r--hugolib/page_test.go2
-rw-r--r--hugolib/site.go1
4 files changed, 3 insertions, 5 deletions
diff --git a/hugolib/hugo_sites.go b/hugolib/hugo_sites.go
index 49dd51cd6..0e7aafe96 100644
--- a/hugolib/hugo_sites.go
+++ b/hugolib/hugo_sites.go
@@ -302,7 +302,6 @@ func (h *HugoSites) createMissingPages() error {
var newPages Pages
for _, s := range h.Sites {
-
if s.isEnabled(KindHome) {
// home pages
home := s.findPagesByKind(KindHome)
diff --git a/hugolib/page.go b/hugolib/page.go
index 3169e123a..dcfffa666 100644
--- a/hugolib/page.go
+++ b/hugolib/page.go
@@ -254,8 +254,8 @@ type Position struct {
type Pages []*Page
-func (p Pages) String() string {
- return fmt.Sprintf("Pages(%d)", len(p))
+func (ps Pages) String() string {
+ return fmt.Sprintf("Pages(%d)", len(ps))
}
func (ps Pages) FindPagePosByFilePath(inPath string) int {
diff --git a/hugolib/page_test.go b/hugolib/page_test.go
index d80516ddd..ab6087647 100644
--- a/hugolib/page_test.go
+++ b/hugolib/page_test.go
@@ -1361,7 +1361,7 @@ func TestPageParams(t *testing.T) {
for i, c := range pagesParamsTemplate {
p, err := s.NewPageFrom(strings.NewReader(c), "content/post/params.md")
require.NoError(t, err, "err during parse", "#%d", i)
- for key, _ := range wantedMap {
+ for key := range wantedMap {
assert.Equal(t, wantedMap[key], p.Params[key], "#%d", key)
}
}
diff --git a/hugolib/site.go b/hugolib/site.go
index 933f4db04..007ad4246 100644
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -546,7 +546,6 @@ type whatChanged struct {
// reBuild partially rebuilds a site given the filesystem events.
// It returns whetever the content source was changed.
func (s *Site) reProcess(events []fsnotify.Event) (whatChanged, error) {
-
s.Log.DEBUG.Printf("Rebuild for events %q", events)
s.timerStep("initialize rebuild")