summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-04-11 09:57:43 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-04-11 09:57:43 +0200
commit24d5c219424a9777bb1dd366b43e68e6f47e1adb (patch)
treed8cbdab710dfde2030354a675fc76f58bfe449e4 /commands
parenta7d00fc39e87a5cac99b3a2380f5cc8c135d2b4b (diff)
commands: Fix some flag diff
The CLI docs output is now identical with the master version. See #4598
Diffstat (limited to 'commands')
-rw-r--r--commands/benchmark.go1
-rw-r--r--commands/commands.go3
-rw-r--r--commands/convert.go7
3 files changed, 7 insertions, 4 deletions
diff --git a/commands/benchmark.go b/commands/benchmark.go
index 409b305a2..4cdac883f 100644
--- a/commands/benchmark.go
+++ b/commands/benchmark.go
@@ -44,6 +44,7 @@ creating a benchmark.`,
cmd.Flags().StringVar(&c.cpuProfileFile, "cpuprofile", "", "path/filename for the CPU profile file")
cmd.Flags().StringVar(&c.memProfileFile, "memprofile", "", "path/filename for the memory profile file")
cmd.Flags().IntVarP(&c.benchmarkTimes, "count", "n", 13, "number of times to build the site")
+ cmd.Flags().Bool("renderToMemory", false, "render to memory (only useful for benchmark testing)")
cmd.RunE = c.benchmark
diff --git a/commands/commands.go b/commands/commands.go
index 0f6cb762f..2431e5500 100644
--- a/commands/commands.go
+++ b/commands/commands.go
@@ -138,6 +138,8 @@ Complete documentation is available at http://gohugo.io/.`,
cc.cmd.Flags().BoolVarP(&cc.buildWatch, "watch", "w", false, "watch filesystem for changes and recreate as needed")
+ cc.cmd.Flags().Bool("renderToMemory", false, "render to memory (only useful for benchmark testing)")
+
// Set bash-completion
_ = cc.cmd.PersistentFlags().SetAnnotation("logFile", cobra.BashCompFilenameExt, []string{})
@@ -194,7 +196,6 @@ func (cc *hugoBuilderCommon) handleFlags(cmd *cobra.Command) {
cmd.Flags().BoolP("noTimes", "", false, "don't sync modification time of files")
cmd.Flags().BoolP("noChmod", "", false, "don't sync permission mode of files")
cmd.Flags().BoolP("i18n-warnings", "", false, "print missing translations")
- cmd.Flags().Bool("renderToMemory", false, "render to memory (only useful for benchmark testing)")
cmd.Flags().StringSlice("disableKinds", []string{}, "disable different kind of pages (home, RSS etc.)")
diff --git a/commands/convert.go b/commands/convert.go
index 202cc1111..fb70a148d 100644
--- a/commands/convert.go
+++ b/commands/convert.go
@@ -33,17 +33,18 @@ var (
)
type convertCmd struct {
+ hugoBuilderCommon
+
outputDir string
unsafe bool
- *baseBuilderCmd
+ *baseCmd
}
func newConvertCmd() *convertCmd {
cc := &convertCmd{}
- // TODO(bep) cli refactor this is more than it had
- cc.baseBuilderCmd = newBuilderCmd(&cobra.Command{
+ cc.baseCmd = newBaseCmd(&cobra.Command{
Use: "convert",
Short: "Convert your content to different formats",
Long: `Convert your content (e.g. front matter) to different formats.