mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
hugolib: Remove unused code
This commit is contained in:
@@ -398,7 +398,6 @@ type siteBuilderCfg struct {
|
||||
language *helpers.Language
|
||||
s *Site
|
||||
pageCollections *PageCollections
|
||||
baseURL string
|
||||
}
|
||||
|
||||
// TODO(bep) get rid of this
|
||||
@@ -1787,63 +1786,6 @@ func (s *Site) publish(statCounter *uint64, path string, r io.Reader) (err error
|
||||
return helpers.WriteToDisk(path, r, s.Fs.Destination)
|
||||
}
|
||||
|
||||
func (s *Site) draftStats() string {
|
||||
var msg string
|
||||
|
||||
switch s.draftCount {
|
||||
case 0:
|
||||
return "0 draft content"
|
||||
case 1:
|
||||
msg = "1 draft rendered"
|
||||
default:
|
||||
msg = fmt.Sprintf("%d drafts rendered", s.draftCount)
|
||||
}
|
||||
|
||||
if s.Cfg.GetBool("buildDrafts") {
|
||||
return fmt.Sprintf("%d of ", s.draftCount) + msg
|
||||
}
|
||||
|
||||
return "0 of " + msg
|
||||
}
|
||||
|
||||
func (s *Site) futureStats() string {
|
||||
var msg string
|
||||
|
||||
switch s.futureCount {
|
||||
case 0:
|
||||
return "0 future content"
|
||||
case 1:
|
||||
msg = "1 future rendered"
|
||||
default:
|
||||
msg = fmt.Sprintf("%d futures rendered", s.futureCount)
|
||||
}
|
||||
|
||||
if s.Cfg.GetBool("buildFuture") {
|
||||
return fmt.Sprintf("%d of ", s.futureCount) + msg
|
||||
}
|
||||
|
||||
return "0 of " + msg
|
||||
}
|
||||
|
||||
func (s *Site) expiredStats() string {
|
||||
var msg string
|
||||
|
||||
switch s.expiredCount {
|
||||
case 0:
|
||||
return "0 expired content"
|
||||
case 1:
|
||||
msg = "1 expired rendered"
|
||||
default:
|
||||
msg = fmt.Sprintf("%d expired rendered", s.expiredCount)
|
||||
}
|
||||
|
||||
if s.Cfg.GetBool("buildExpired") {
|
||||
return fmt.Sprintf("%d of ", s.expiredCount) + msg
|
||||
}
|
||||
|
||||
return "0 of " + msg
|
||||
}
|
||||
|
||||
func getGoMaxProcs() int {
|
||||
if gmp := os.Getenv("GOMAXPROCS"); gmp != "" {
|
||||
if p, err := strconv.Atoi(gmp); err != nil {
|
||||
|
Reference in New Issue
Block a user