mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
Clean up lint in various packages
Changes fall into one of the following: - gofmt -s - receiver name is inconsistent - omit unused 2nd value from range - godoc comment formed incorrectly - err assigned and not used - if block ends with a return statement followed by else
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
d45e358a05
commit
47fdfd5196
@@ -65,6 +65,7 @@ const (
|
||||
KindPage = "page"
|
||||
|
||||
// The rest are node types; home page, sections etc.
|
||||
|
||||
KindHome = "home"
|
||||
KindSection = "section"
|
||||
KindTaxonomy = "taxonomy"
|
||||
@@ -484,10 +485,10 @@ func traverse(keys []string, m map[string]interface{}) interface{} {
|
||||
if len(rest) == 0 {
|
||||
// That was the last key.
|
||||
return result
|
||||
} else {
|
||||
// That was not the last key.
|
||||
return traverse(rest, cast.ToStringMap(result))
|
||||
}
|
||||
|
||||
// That was not the last key.
|
||||
return traverse(rest, cast.ToStringMap(result))
|
||||
}
|
||||
|
||||
func (p *Page) Author() Author {
|
||||
|
Reference in New Issue
Block a user