hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit 937592cb85f6b4bf4603230050ac0afdcc93058b
parent 8a60571fd2bd95f77c25d50daf285196e91a266a
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Wed, 23 Mar 2016 10:10:28 +0100

hugolib: Fix some more Golint warnings

Diffstat:
Mhugolib/page_taxonomy_test.go | 20++++++++++----------
Mhugolib/shortcode_test.go | 2+-
Mhugolib/sitemap.go | 1+
Mhugolib/taxonomy_test.go | 2+-
4 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/hugolib/page_taxonomy_test.go b/hugolib/page_taxonomy_test.go
@@ -18,13 +18,13 @@ import (
 	"testing"
 )
 
-var PAGE_YAML_WITH_TAXONOMIES_A = `---
+var pageYamlWithTaxonomiesA = `---
 tags: ['a', 'B', 'c']
 categories: 'd'
 ---
 YAML frontmatter with tags and categories taxonomy.`
 
-var PAGE_YAML_WITH_TAXONOMIES_B = `---
+var pageYamlWithTaxonomiesB = `---
 tags:
  - "a"
  - "B"
@@ -33,13 +33,13 @@ categories: 'd'
 ---
 YAML frontmatter with tags and categories taxonomy.`
 
-var PAGE_YAML_WITH_TAXONOMIES_C = `---
+var pageYamlWithTaxonomiesC = `---
 tags: 'E'
 categories: 'd'
 ---
 YAML frontmatter with tags and categories taxonomy.`
 
-var PAGE_JSON_WITH_TAXONOMIES = `{
+var pageJSONWithTaxonomies = `{
   "categories": "D",
   "tags": [
     "a",
@@ -49,18 +49,18 @@ var PAGE_JSON_WITH_TAXONOMIES = `{
 }
 JSON Front Matter with tags and categories`
 
-var PAGE_TOML_WITH_TAXONOMIES = `+++
+var pageTomlWithTaxonomies = `+++
 tags = [ "a", "B", "c" ]
 categories = "d"
 +++
 TOML Front Matter with tags and categories`
 
 func TestParseTaxonomies(t *testing.T) {
-	for _, test := range []string{PAGE_TOML_WITH_TAXONOMIES,
-		PAGE_JSON_WITH_TAXONOMIES,
-		PAGE_YAML_WITH_TAXONOMIES_A,
-		PAGE_YAML_WITH_TAXONOMIES_B,
-		PAGE_YAML_WITH_TAXONOMIES_C,
+	for _, test := range []string{pageTomlWithTaxonomies,
+		pageJSONWithTaxonomies,
+		pageYamlWithTaxonomiesA,
+		pageYamlWithTaxonomiesB,
+		pageYamlWithTaxonomiesC,
 	} {
 
 		p, _ := NewPage("page/with/taxonomy")
diff --git a/hugolib/shortcode_test.go b/hugolib/shortcode_test.go
@@ -534,7 +534,7 @@ func BenchmarkReplaceShortcodeTokens(b *testing.B) {
 		{strings.Repeat("A ", 3000) + " {#{#HUGOSHORTCODE-1#}#}." + strings.Repeat("BC ", 1000) + " {#{#HUGOSHORTCODE-1#}#}.", map[string]string{"{#{#HUGOSHORTCODE-1#}#}": "Hello World"}, []byte(strings.Repeat("A ", 3000) + " Hello World." + strings.Repeat("BC ", 1000) + " Hello World.")},
 	}
 
-	var in []input = make([]input, b.N*len(data))
+	var in = make([]input, b.N*len(data))
 	var cnt = 0
 	for i := 0; i < b.N; i++ {
 		for _, this := range data {
diff --git a/hugolib/sitemap.go b/hugolib/sitemap.go
@@ -18,6 +18,7 @@ import (
 	jww "github.com/spf13/jwalterweatherman"
 )
 
+// Sitemap configures the sitemap to be generated.
 type Sitemap struct {
 	ChangeFreq string
 	Priority   float64
diff --git a/hugolib/taxonomy_test.go b/hugolib/taxonomy_test.go
@@ -20,7 +20,7 @@ import (
 
 func TestSitePossibleTaxonomies(t *testing.T) {
 	site := new(Site)
-	page, _ := NewPageFrom(strings.NewReader(PAGE_YAML_WITH_TAXONOMIES_A), "path/to/page")
+	page, _ := NewPageFrom(strings.NewReader(pageYamlWithTaxonomiesA), "path/to/page")
 	site.Pages = append(site.Pages, page)
 	taxonomies := site.possibleTaxonomies()
 	if !compareStringSlice(taxonomies, []string{"tags", "categories"}) {