shithub: hugo

Download patch

ref: 05b888877db016e5c45711069272a39031377297
parent: 85bcac530adac2dcc21fdfd6acb902f76c3a5acf
author: Bjørn Erik Pedersen <[email protected]>
date: Thu Apr 7 12:05:23 EDT 2016

huglib: Add even more missing GoDoc

See #2014

--- a/hugolib/hugo.go
+++ b/hugolib/hugo.go
@@ -15,13 +15,18 @@
 
 import (
 	"fmt"
-	"github.com/spf13/hugo/helpers"
 	"html/template"
+
+	"github.com/spf13/hugo/helpers"
 )
 
 var (
+	// CommitHash contains the current Git revision. Use make to build to make
+	// sure this gets set.
 	CommitHash string
-	BuildDate  string
+
+	// BuildDate contains the date of the current build.
+	BuildDate string
 )
 
 var hugoInfo *HugoInfo
--- a/hugolib/pagesPrevNext.go
+++ b/hugolib/pagesPrevNext.go
@@ -13,6 +13,7 @@
 
 package hugolib
 
+// Prev returns the previous page reletive to the given page.
 func (p Pages) Prev(cur *Page) *Page {
 	for x, c := range p {
 		if c.UniqueID() == cur.UniqueID() {
@@ -25,6 +26,7 @@
 	return nil
 }
 
+// Next returns the next page reletive to the given page.
 func (p Pages) Next(cur *Page) *Page {
 	for x, c := range p {
 		if c.UniqueID() == cur.UniqueID() {
--- a/hugolib/planner.go
+++ b/hugolib/planner.go
@@ -18,6 +18,8 @@
 	"io"
 )
 
+// ShowPlan prints a build plan to the given Writer.
+// Useful for debugging.
 func (s *Site) ShowPlan(out io.Writer) (err error) {
 	if s.Source == nil || len(s.Source.Files()) <= 0 {
 		fmt.Fprintf(out, "No source files provided.\n")