shithub: hugo

Download patch

ref: 1b5f59b071bfe7dd66b02a900fbd78296d7baf81
parent: 30af267b32dcbf07cd382c1541a6cfd18c5e7c89
author: spf13 <[email protected]>
date: Mon Aug 25 09:13:11 EDT 2014

go fmt site.go

--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -56,21 +56,21 @@
 //
 // 5. The entire collection of files is written to disk.
 type Site struct {
-	Pages      Pages
-	Tmpl       Template
-	Taxonomies TaxonomyList
-	Source     source.Input
-	Sections   Taxonomy
-	Info       SiteInfo
-	Shortcodes map[string]ShortcodeFunc
-	Menus      Menus
-	timer      *nitro.B
-	Target     target.Output
-	Alias      target.AliasPublisher
-	Completed  chan bool
-	RunMode    runmode
-	params     map[string]interface{}
-	draftCount int
+	Pages       Pages
+	Tmpl        Template
+	Taxonomies  TaxonomyList
+	Source      source.Input
+	Sections    Taxonomy
+	Info        SiteInfo
+	Shortcodes  map[string]ShortcodeFunc
+	Menus       Menus
+	timer       *nitro.B
+	Target      target.Output
+	Alias       target.AliasPublisher
+	Completed   chan bool
+	RunMode     runmode
+	params      map[string]interface{}
+	draftCount  int
 	futureCount int
 }
 
@@ -353,7 +353,7 @@
 			if page.IsDraft() {
 				s.draftCount += 1
 			}
-		
+
 			if page.IsFuture() {
 				s.futureCount += 1
 			}
@@ -827,7 +827,7 @@
 func (s *Site) Stats() {
 	jww.FEEDBACK.Println(s.draftStats())
 	jww.FEEDBACK.Println(s.futureStats())
-        jww.FEEDBACK.Printf("%d pages created \n", len(s.Pages))
+	jww.FEEDBACK.Printf("%d pages created \n", len(s.Pages))
 
 	taxonomies := viper.GetStringMapString("Taxonomies")
 
@@ -987,26 +987,26 @@
 
 	if viper.GetBool("BuildDrafts") {
 		return fmt.Sprintf("%d of ", s.draftCount) + msg
-	} 
+	}
 
 	return "0 of " + msg
 }
 
 func (s *Site) futureStats() string {
-        var msg string
+	var msg string
 
-        switch s.futureCount {
-        case 0:
-                return "0 future content "
-        case 1:
-                msg = "1 future rendered "
-        default:
-                msg = fmt.Sprintf("%d future rendered", s.draftCount)
-        }
+	switch s.futureCount {
+	case 0:
+		return "0 future content "
+	case 1:
+		msg = "1 future rendered "
+	default:
+		msg = fmt.Sprintf("%d future rendered", s.draftCount)
+	}
 
-        if viper.GetBool("BuildFuture") {
-                return fmt.Sprintf("%d of ", s.futureCount) + msg
-        }
+	if viper.GetBool("BuildFuture") {
+		return fmt.Sprintf("%d of ", s.futureCount) + msg
+	}
 
-        return "0 of " + msg
+	return "0 of " + msg
 }