hugo

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

git clone git://git.shimmy1996.com/hugo.git
commit 223073c6fdf1258de41782f96444ac81f32e9235
parent 39fe42cf6b0032712e2fa97f86accd4a29ad9d24
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Wed,  6 Jul 2016 23:23:44 +0200

transform: Add missing GoDoc

Diffstat:
Mtransform/chain.go | 5++++-
Mtransform/hugogeneratorinject.go | 1+
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/transform/chain.go b/transform/chain.go
@@ -15,8 +15,9 @@ package transform
 
 import (
 	"bytes"
-	bp "github.com/spf13/hugo/bufferpool"
 	"io"
+
+	bp "github.com/spf13/hugo/bufferpool"
 )
 
 type trans func(rw contentTransformer)
@@ -25,10 +26,12 @@ type link trans
 
 type chain []link
 
+// NewChain creates a chained content transformer given the provided transforms.
 func NewChain(trs ...link) chain {
 	return trs
 }
 
+// NewEmptyTransforms creates a new slice of transforms with a capacity of 20.
 func NewEmptyTransforms() []link {
 	return make([]link, 0, 20)
 }
diff --git a/transform/hugogeneratorinject.go b/transform/hugogeneratorinject.go
@@ -24,6 +24,7 @@ import (
 var metaTagsCheck = regexp.MustCompile(`(?i)<meta\s+name=['|"]?generator['|"]?`)
 var hugoGeneratorTag = fmt.Sprintf(`<meta name="generator" content="Hugo %s" />`, helpers.HugoVersion())
 
+// HugoGeneratorInject injects a meta generator tag for Hugo if none present.
 func HugoGeneratorInject(ct contentTransformer) {
 	if metaTagsCheck.Match(ct.Content()) {
 		ct.Write(ct.Content())