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

@@ -14,14 +14,14 @@
package navigation
import (
"github.com/gohugoio/hugo/common/maps"
"github.com/gohugoio/hugo/common/types"
"github.com/gohugoio/hugo/compare"
"html/template"
"sort"
"strings"
"github.com/gohugoio/hugo/common/maps"
"github.com/gohugoio/hugo/common/types"
"github.com/gohugoio/hugo/compare"
"github.com/spf13/cast"
)

View File

@@ -94,7 +94,6 @@ func PageMenusFromPage(p Page) (PageMenus, error) {
}
return pm, nil
}
func NewMenuQueryProvider(
@@ -102,7 +101,6 @@ func NewMenuQueryProvider(
pagem PageMenusGetter,
sitem MenusGetter,
p Page) MenuQueryProvider {
return &pageMenus{
p: p,
pagem: pagem,
@@ -119,7 +117,6 @@ type pageMenus struct {
}
func (pm *pageMenus) HasMenuCurrent(menuID string, me *MenuEntry) bool {
// page is labeled as "shadow-member" of the menu with the same identifier as the section
if pm.setionPagesMenu != "" {
section := pm.p.Section()
@@ -136,7 +133,6 @@ func (pm *pageMenus) HasMenuCurrent(menuID string, me *MenuEntry) bool {
menus := pm.pagem.Menus()
if m, ok := menus[menuID]; ok {
for _, child := range me.Children {
if child.IsEqual(m) {
return true
@@ -165,7 +161,6 @@ func (pm *pageMenus) HasMenuCurrent(menuID string, me *MenuEntry) bool {
}
return false
}
func (pm *pageMenus) IsMenuCurrent(menuID string, inme *MenuEntry) bool {