shithub: hugo

Download patch

ref: 63ffb916d67f9953320b402871c532c0b7a80efc
parent: 81c41d6f20a02a108beab0f05a6bf4a6721280e2
author: bep <[email protected]>
date: Sat Mar 7 07:59:04 EST 2015

parser: apply some Golint rules

--- a/parser/page.go
+++ b/parser/page.go
@@ -132,7 +132,7 @@
 	if idx == -1 {
 		return firstFive, nil
 	}
-	idx += 1 // include newline.
+	idx++ // include newline.
 	return firstFive[:idx], nil
 }
 
@@ -184,8 +184,8 @@
 	var (
 		c         byte
 		buf       bytes.Buffer
-		level     int  = 0
-		sameDelim bool = bytes.Equal(left, right)
+		level     int
+		sameDelim = bytes.Equal(left, right)
 	)
 
 	// Frontmatter must start with a delimiter. To check it first,