all: Format code with gofumpt

See https://github.com/mvdan/gofumpt
This commit is contained in:
Bjørn Erik Pedersen
2020-12-02 13:23:25 +01:00
parent 32471b57bd
commit d90e37e0c6
442 changed files with 1426 additions and 2254 deletions

View File

@@ -243,7 +243,6 @@ func (p *pageState) RegularPages() page.Pages {
}
p.regularPages = pages
})
return p.regularPages
@@ -358,11 +357,9 @@ func (p *pageState) TranslationKey() string {
} else if p.IsNode() {
p.translationKey = path.Join(p.Kind(), p.SectionsPath())
}
})
return p.translationKey
}
// AllTranslations returns all translations, including the current Page.
@@ -469,7 +466,6 @@ func (p *pageState) getLayoutDescriptor() output.LayoutDescriptor {
})
return p.layoutDescriptor
}
func (p *pageState) resolveTemplate(layouts ...string) (tpl.Template, bool, error) {
@@ -500,7 +496,6 @@ func (p *pageState) initOutputFormat(isRenderingSite bool, idx int) error {
}
return nil
}
// Must be run after the site section tree etc. is built and ready.
@@ -546,7 +541,6 @@ func (p *pageState) renderResources() (err error) {
for _, i := range toBeDeleted {
p.deleteResource(i)
}
})
return
@@ -681,7 +675,6 @@ func (p *pageState) Render(layout ...string) (template.HTML, error) {
return "", p.wrapError(errors.Wrapf(err, "failed to execute template %q v", layout))
}
return template.HTML(res), nil
}
// wrapError adds some more context to the given error if possible/needed
@@ -714,7 +707,6 @@ func (p *pageState) getContentConverter() converter.Converter {
markup = "markdown"
}
p.m.contentConverter, err = p.m.newContentConverter(p, markup, p.m.renderingConfigOverrides)
})
if err != nil {
@@ -724,7 +716,6 @@ func (p *pageState) getContentConverter() converter.Converter {
}
func (p *pageState) mapContent(bucket *pagesMapBucket, meta *pageMeta) error {
s := p.shortcodeState
rn := &pageContentMap{
@@ -893,7 +884,6 @@ func (p *pageState) parseError(err error, input []byte, offset int) error {
}
pos := p.posFromInput(input, offset)
return herrors.NewFileError("md", -1, pos.LineNumber, pos.ColumnNumber, err)
}
func (p *pageState) pathOrTitle() string {
@@ -955,7 +945,6 @@ func (p *pageState) shiftToOutputFormat(isRenderingSite bool, idx int) error {
if isRenderingSite {
cp := p.pageOutput.cp
if cp == nil {
// Look for content to reuse.
for i := 0; i < len(p.pageOutputs); i++ {
if i == idx {