hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit 1d6286b0945d2cabc11db712e28dd3b0ccbbe269
parent a291f3c5d94a7911f552bf607fef869e312ae3b7
Author: Steve Francia <steve.francia@gmail.com>
Date:   Thu, 24 Dec 2015 09:47:00 -0500

update to use cobra's sub package doc

Diffstat:
Mcommands/gendoc.go | 12+++++++-----
Mcommands/genman.go | 5+++--
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/commands/gendoc.go b/commands/gendoc.go
@@ -15,14 +15,16 @@ package commands
 
 import (
 	"fmt"
-	"github.com/spf13/cobra"
-	"github.com/spf13/hugo/helpers"
-	"github.com/spf13/hugo/hugofs"
-	jww "github.com/spf13/jwalterweatherman"
 	"path"
 	"path/filepath"
 	"strings"
 	"time"
+
+	"github.com/spf13/cobra"
+	"github.com/spf13/cobra/doc"
+	"github.com/spf13/hugo/helpers"
+	"github.com/spf13/hugo/hugofs"
+	jww "github.com/spf13/jwalterweatherman"
 )
 
 const gendocFrontmatterTemplate = `---
@@ -67,7 +69,7 @@ for rendering in Hugo.`,
 		}
 
 		jww.FEEDBACK.Println("Generating Hugo command-line documentation in", gendocdir, "...")
-		cobra.GenMarkdownTreeCustom(cmd.Root(), gendocdir, prepender, linkHandler)
+		doc.GenMarkdownTreeCustom(cmd.Root(), gendocdir, prepender, linkHandler)
 		jww.FEEDBACK.Println("Done.")
 
 		return nil
diff --git a/commands/genman.go b/commands/genman.go
@@ -18,6 +18,7 @@ import (
 	"strings"
 
 	"github.com/spf13/cobra"
+	"github.com/spf13/cobra/doc"
 	"github.com/spf13/hugo/helpers"
 	"github.com/spf13/hugo/hugofs"
 	jww "github.com/spf13/jwalterweatherman"
@@ -32,7 +33,7 @@ command-line interface.  By default, it creates the man page files
 in the "man" directory under the current directory.`,
 
 	RunE: func(cmd *cobra.Command, args []string) error {
-		header := &cobra.GenManHeader{
+		header := &doc.GenManHeader{
 			Section: "1",
 			Manual:  "Hugo Manual",
 			Source:  fmt.Sprintf("Hugo %s", helpers.HugoVersion()),
@@ -47,7 +48,7 @@ in the "man" directory under the current directory.`,
 		cmd.Root().DisableAutoGenTag = true
 
 		jww.FEEDBACK.Println("Generating Hugo man pages in", genmandir, "...")
-		cmd.Root().GenManTree(header, genmandir)
+		doc.GenManTree(cmd.Root(), header, genmandir)
 
 		jww.FEEDBACK.Println("Done.")