hugolib: apply some Hugolint rules

This commit is contained in:
bep 2015-03-07 00:13:06 +01:00
parent b9f8c0c120
commit 8539f78143
2 changed files with 4 additions and 6 deletions

View file

@ -56,6 +56,6 @@ func (h HandledResult) String() string {
return h.Error()
}
func (hr HandledResult) Page() *Page {
return hr.page
func (h HandledResult) Page() *Page {
return h.page
}

View file

@ -65,9 +65,8 @@ func (h markdownHandler) PageConvert(p *Page, t tpl.Template) HandledResult {
if err != nil {
jww.FATAL.Printf("Fail to replace short code tokens in %s:\n%s", p.BaseFileName(), err.Error())
return HandledResult{err: err}
} else {
tmpContent = tmpContentWithTokensReplaced
}
tmpContent = tmpContentWithTokensReplaced
}
p.Content = helpers.BytesToHTML(tmpContent)
@ -118,9 +117,8 @@ func (h rstHandler) PageConvert(p *Page, t tpl.Template) HandledResult {
if err != nil {
jww.FATAL.Printf("Fail to replace short code tokens in %s:\n%s", p.BaseFileName(), err.Error())
return HandledResult{err: err}
} else {
tmpContent = tmpContentWithTokensReplaced
}
tmpContent = tmpContentWithTokensReplaced
}
p.Content = helpers.BytesToHTML(tmpContent)