mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
Removing GetSection
Using GetXXX is not idiomatic to Go. Also added a bunch of unit testing around this method.
This commit is contained in:
@@ -118,7 +118,7 @@ func (page *Page) Type() string {
|
||||
return page.contentType
|
||||
}
|
||||
page.guessSection()
|
||||
if x := page.GetSection(); x != "" {
|
||||
if x := page.Section; x != "" {
|
||||
return x
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user