mirror of
https://github.com/gohugoio/hugo.git
synced 2025-09-02 22:52:51 +02:00
Fix errors reported by Go Vet
This commit is contained in:
@@ -835,7 +835,7 @@ func Highlight(in interface{}, lang string) template.HTML {
|
||||
}
|
||||
|
||||
func Markdownify(text string) template.HTML {
|
||||
return template.HTML(helpers.RenderBytes(helpers.RenderingContext{Content: []byte(text), PageFmt: "markdown"}))
|
||||
return template.HTML(helpers.RenderBytes(&helpers.RenderingContext{Content: []byte(text), PageFmt: "markdown"}))
|
||||
}
|
||||
|
||||
func refPage(page interface{}, ref, methodName string) template.HTML {
|
||||
|
@@ -941,7 +941,7 @@ func TestSafeHtml(t *testing.T) {
|
||||
} {
|
||||
tmpl, err := template.New("test").Parse(this.tmplStr)
|
||||
if err != nil {
|
||||
t.Errorf("[%d] unable to create new html template %q: %s", this.tmplStr, err)
|
||||
t.Errorf("[%d] unable to create new html template %q: %s", i, this.tmplStr, err)
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -976,7 +976,7 @@ func TestSafeHtmlAttr(t *testing.T) {
|
||||
} {
|
||||
tmpl, err := template.New("test").Parse(this.tmplStr)
|
||||
if err != nil {
|
||||
t.Errorf("[%d] unable to create new html template %q: %s", this.tmplStr, err)
|
||||
t.Errorf("[%d] unable to create new html template %q: %s", i, this.tmplStr, err)
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -1011,7 +1011,7 @@ func TestSafeCss(t *testing.T) {
|
||||
} {
|
||||
tmpl, err := template.New("test").Parse(this.tmplStr)
|
||||
if err != nil {
|
||||
t.Errorf("[%d] unable to create new html template %q: %s", this.tmplStr, err)
|
||||
t.Errorf("[%d] unable to create new html template %q: %s", i, this.tmplStr, err)
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -1046,7 +1046,7 @@ func TestSafeUrl(t *testing.T) {
|
||||
} {
|
||||
tmpl, err := template.New("test").Parse(this.tmplStr)
|
||||
if err != nil {
|
||||
t.Errorf("[%d] unable to create new html template %q: %s", this.tmplStr, err)
|
||||
t.Errorf("[%d] unable to create new html template %q: %s", i, this.tmplStr, err)
|
||||
continue
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user