diff options
author | Bjørn Erik Pedersen <[email protected]> | 2020-12-02 13:23:25 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2020-12-03 13:12:58 +0100 |
commit | d90e37e0c6e812f9913bf256c9c81aa05b7a08aa (patch) | |
tree | 7b1b14464eefec1188ca2eed53c64e4823453cc9 /hugolib/site_render.go | |
parent | 32471b57bde51c55a15dbf1db75d6e5f7232c347 (diff) | |
download | hugo-d90e37e0c6e812f9913bf256c9c81aa05b7a08aa.tar.gz hugo-d90e37e0c6e812f9913bf256c9c81aa05b7a08aa.zip |
all: Format code with gofumpt
See https://github.com/mvdan/gofumpt
Diffstat (limited to 'hugolib/site_render.go')
-rw-r--r-- | hugolib/site_render.go | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/hugolib/site_render.go b/hugolib/site_render.go index 531d481f0..84293cfc0 100644 --- a/hugolib/site_render.go +++ b/hugolib/site_render.go @@ -53,7 +53,6 @@ func (s siteRenderContext) renderSingletonPages() bool { // 1 for all sites return s.sitesOutIdx == 0 - } // renderPages renders pages each corresponding to a markdown file. @@ -107,7 +106,6 @@ func pageRenderer( pages <-chan *pageState, results chan<- error, wg *sync.WaitGroup) { - defer wg.Done() for p := range pages { @@ -184,7 +182,6 @@ func (s *Site) logMissingLayout(name, layout, kind, outputFormat string) { // renderPaginator must be run after the owning Page has been rendered. func (s *Site) renderPaginator(p *pageState, templ tpl.Template) error { - paginatePath := s.Cfg.GetString("paginatePath") d := p.targetPathDescriptor @@ -234,7 +231,6 @@ func (s *Site) render404() error { }, output.HTMLFormat, ) - if err != nil { return err } @@ -269,10 +265,10 @@ func (s *Site) renderSitemap() error { kind: kindSitemap, urlPaths: pagemeta.URLPath{ URL: s.siteCfg.sitemap.Filename, - }}, + }, + }, output.HTMLFormat, ) - if err != nil { return err } @@ -305,7 +301,6 @@ func (s *Site) renderRobotsTXT() error { }, }, output.RobotsTxtFormat) - if err != nil { return err } @@ -317,7 +312,6 @@ func (s *Site) renderRobotsTXT() error { templ := s.lookupLayouts("robots.txt", "_default/robots.txt", "_internal/_default/robots.txt") return s.renderAndWritePage(&s.PathSpec.ProcessingStats.Pages, "Robots Txt", p.targetPaths().TargetFilename, p, templ) - } // renderAliases renders shell pages that simply have a redirect in the header. @@ -385,7 +379,6 @@ func (s *Site) renderAliases() error { // renderMainLanguageRedirect creates a redirect to the main language home, // depending on if it lives in sub folder (e.g. /en) or not. func (s *Site) renderMainLanguageRedirect() error { - if !s.h.multilingual.enabled() || s.h.IsMultihost() { // No need for a redirect return nil |