mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-27 22:09:53 +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:
@@ -25,7 +25,6 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
//"sync"
|
||||
)
|
||||
|
||||
var DefaultTimer = nitro.Initalize()
|
||||
@@ -381,8 +380,7 @@ func (s *Site) BuildSiteMeta() (err error) {
|
||||
}
|
||||
|
||||
for i, p := range s.Pages {
|
||||
sect := p.GetSection()
|
||||
s.Sections.Add(sect, s.Pages[i])
|
||||
s.Sections.Add(p.Section, s.Pages[i])
|
||||
}
|
||||
|
||||
for k, _ := range s.Sections {
|
||||
|
Reference in New Issue
Block a user