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/content_map_page.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/content_map_page.go')
-rw-r--r-- | hugolib/content_map_page.go | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/hugolib/content_map_page.go b/hugolib/content_map_page.go index e79228ba3..296363359 100644 --- a/hugolib/content_map_page.go +++ b/hugolib/content_map_page.go @@ -225,7 +225,6 @@ func (m *pageMap) newPageFromContentNode(n *contentNode, parentBucket *pagesMapB } func (m *pageMap) newResource(fim hugofs.FileMetaInfo, owner *pageState) (resource.Resource, error) { - if owner == nil { panic("owner is nil") } @@ -424,7 +423,6 @@ func (m *pageMap) assembleResources(s string, p *pageState, parentBucket *pagesM } func (m *pageMap) assembleSections() error { - var sectionsToDelete []string var err error @@ -508,7 +506,6 @@ func (m *pageMap) assembleSections() error { } func (m *pageMap) assembleTaxonomies() error { - var taxonomiesToDelete []string var err error @@ -565,7 +562,6 @@ func (m *pageMap) assembleTaxonomies() error { } return err - } func (m *pageMap) attachPageToViews(s string, b *contentNode) { @@ -656,7 +652,6 @@ func (m *pageMap) collectSections(query pageMapQuery, fn func(c *contentNode)) e } func (m *pageMap) collectSectionsFn(query pageMapQuery, fn func(s string, c *contentNode) bool) error { - if !strings.HasSuffix(query.Prefix, "/") { query.Prefix += "/" } @@ -957,11 +952,9 @@ func (w *sectionWalker) applyAggregates() *sectionAggregateHandler { return w.walkLevel("/", func() sectionWalkHandler { return §ionAggregateHandler{} }).(*sectionAggregateHandler) - } func (w *sectionWalker) walkLevel(prefix string, createVisitor func() sectionWalkHandler) sectionWalkHandler { - level := strings.Count(prefix, "/") visitor := createVisitor() @@ -1029,7 +1022,6 @@ func (w *sectionWalker) walkLevel(prefix string, createVisitor func() sectionWal }) return visitor - } type viewName struct { |