mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
menu: make receiver name on Page methods consistent
Apply some Golint rules on Menu, esp. making the method receiver names consistent.
This commit is contained in:
@@ -399,7 +399,7 @@ func (ts testMenuState) findTestMenuEntryByName(mn string, id string) *MenuEntry
|
||||
}
|
||||
|
||||
func (ts testMenuState) findTestMenuEntry(mn string, id string, matcher func(me *MenuEntry, id string) bool) *MenuEntry {
|
||||
var found *MenuEntry = nil
|
||||
var found *MenuEntry
|
||||
if menu, ok := ts.site.Menus[mn]; ok {
|
||||
for _, me := range *menu {
|
||||
|
||||
@@ -423,7 +423,7 @@ func (ts testMenuState) findTestMenuEntry(mn string, id string, matcher func(me
|
||||
}
|
||||
|
||||
func (ts testMenuState) findDescendantTestMenuEntry(parent *MenuEntry, id string, matcher func(me *MenuEntry, id string) bool) *MenuEntry {
|
||||
var found *MenuEntry = nil
|
||||
var found *MenuEntry
|
||||
if parent.HasChildren() {
|
||||
for _, child := range parent.Children {
|
||||
|
||||
@@ -500,7 +500,7 @@ func testSiteSetup(s *Site, t *testing.T) {
|
||||
}
|
||||
|
||||
func tomlToMap(s string) (map[string]interface{}, error) {
|
||||
var data map[string]interface{} = make(map[string]interface{})
|
||||
var data = make(map[string]interface{})
|
||||
if _, err := toml.Decode(s, &data); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user