diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-02-05 18:41:40 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-02-05 21:18:45 +0100 |
commit | 87ca0d0cbea19dd2c0aac44dc2731e6247a82ece (patch) | |
tree | 0982fb3e77c5f2de3e8216041f0ee975806a29ae /commands/benchmark.go | |
parent | bd0176a5487b0d8c368a14b3f283b9029f51d619 (diff) |
Clean flags
* Reduce the amount of global flags
* Unexport all flag vars and commands vars
* Some other minor flag cleaning
Diffstat (limited to 'commands/benchmark.go')
-rw-r--r-- | commands/benchmark.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/commands/benchmark.go b/commands/benchmark.go index 7e746535f..f2b7964c0 100644 --- a/commands/benchmark.go +++ b/commands/benchmark.go @@ -19,9 +19,11 @@ import ( "runtime/pprof" ) -var cpuProfilefile string -var memProfilefile string -var benchmarkTimes int +var ( + benchmarkTimes int + cpuProfilefile string + memProfilefile string +) var benchmarkCmd = &cobra.Command{ Use: "benchmark", @@ -31,7 +33,7 @@ creating a benchmark.`, } func init() { - initCoreCommonFlags(benchmarkCmd) + initHugoBuilderFlags(benchmarkCmd) benchmarkCmd.Flags().StringVar(&cpuProfilefile, "cpuprofile", "", "path/filename for the CPU profile file") benchmarkCmd.Flags().StringVar(&memProfilefile, "memprofile", "", "path/filename for the memory profile file") |