summaryrefslogtreecommitdiffstats
path: root/commands/benchmark.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-04-13 08:42:29 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-04-13 09:08:49 +0200
commit2aab6dee850517533683504a6158e0ef0a3ffc57 (patch)
treebf490b5add868d98e85590a3c7a4696cec2297f2 /commands/benchmark.go
parentf3775877c61c11ab7c8fd1fc3e15470bf5da4820 (diff)
commands: Fix handling of persistent CLI flags
See #4607
Diffstat (limited to 'commands/benchmark.go')
-rw-r--r--commands/benchmark.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/benchmark.go b/commands/benchmark.go
index 4cdac883f..3938acf1b 100644
--- a/commands/benchmark.go
+++ b/commands/benchmark.go
@@ -31,7 +31,7 @@ type benchmarkCmd struct {
*baseBuilderCmd
}
-func newBenchmarkCmd() *benchmarkCmd {
+func (b *commandsBuilder) newBenchmarkCmd() *benchmarkCmd {
cmd := &cobra.Command{
Use: "benchmark",
Short: "Benchmark Hugo by building a site a number of times.",
@@ -39,7 +39,7 @@ func newBenchmarkCmd() *benchmarkCmd {
creating a benchmark.`,
}
- c := &benchmarkCmd{baseBuilderCmd: newBuilderCmd(cmd)}
+ c := &benchmarkCmd{baseBuilderCmd: b.newBuilderCmd(cmd)}
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")