From a6de8dfb42176484eba258a3dc87c7f1684a7b7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 23 Mar 2016 17:17:54 +0100 Subject: [PATCH] hugolib: Some more Golint fixes --- hugolib/robotstxt_test.go | 4 ++-- hugolib/scratch.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hugolib/robotstxt_test.go b/hugolib/robotstxt_test.go index dfbaefea1..31f89b847 100644 --- a/hugolib/robotstxt_test.go +++ b/hugolib/robotstxt_test.go @@ -11,7 +11,7 @@ import ( "github.com/spf13/viper" ) -const ROBOTSTXT_TEMPLATE = `User-agent: Googlebot +const robotTxtTemplate = `User-agent: Googlebot {{ range .Data.Pages }} Disallow: {{.RelPermalink}} {{ end }} @@ -31,7 +31,7 @@ func TestRobotsTXTOutput(t *testing.T) { s.initializeSiteInfo() - s.prepTemplates("robots.txt", ROBOTSTXT_TEMPLATE) + s.prepTemplates("robots.txt", robotTxtTemplate) if err := s.CreatePages(); err != nil { t.Fatalf("Unable to create pages: %s", err) diff --git a/hugolib/scratch.go b/hugolib/scratch.go index ec0b18420..1bfd790bf 100644 --- a/hugolib/scratch.go +++ b/hugolib/scratch.go @@ -26,7 +26,7 @@ type Scratch struct { mu sync.RWMutex } -// For single values, Add will add (using the + operator) the addend to the existing addend (if found). +// Add will, for single values, add (using the + operator) the addend to the existing addend (if found). // Supports numeric values and strings. // // If the first add for a key is an array or slice, then the next value(s) will be appended.