From 8539f781435ff06aca3d64b07ff0d0a75fb2ed6d Mon Sep 17 00:00:00 2001 From: bep Date: Sat, 7 Mar 2015 00:13:06 +0100 Subject: [PATCH] hugolib: apply some Hugolint rules --- hugolib/handler_base.go | 4 ++-- hugolib/handler_page.go | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/hugolib/handler_base.go b/hugolib/handler_base.go index 7f02973c..f7440916 100644 --- a/hugolib/handler_base.go +++ b/hugolib/handler_base.go @@ -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 } diff --git a/hugolib/handler_page.go b/hugolib/handler_page.go index b3b23634..5e92ff7e 100644 --- a/hugolib/handler_page.go +++ b/hugolib/handler_page.go @@ -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) -- 2.30.2