mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
commands: Rename --path-warnings, --print-men to --printPathWarnings, --printMemoryUsage
To get it in line with the others.
This commit is contained in:
parent
ea54a99ca5
commit
6819feab6c
7 changed files with 13 additions and 13 deletions
|
@ -305,10 +305,10 @@ func (cc *hugoBuilderCommon) handleFlags(cmd *cobra.Command) {
|
||||||
cmd.Flags().BoolP("noTimes", "", false, "don't sync modification time of files")
|
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("noChmod", "", false, "don't sync permission mode of files")
|
||||||
cmd.Flags().BoolP("i18n-warnings", "", false, "print missing translations")
|
cmd.Flags().BoolP("i18n-warnings", "", false, "print missing translations")
|
||||||
cmd.Flags().BoolP("path-warnings", "", false, "print warnings on duplicate target paths etc.")
|
cmd.Flags().BoolP("printPathWarnings", "", false, "print warnings on duplicate target paths etc.")
|
||||||
cmd.Flags().StringVarP(&cc.cpuprofile, "profile-cpu", "", "", "write cpu profile to `file`")
|
cmd.Flags().StringVarP(&cc.cpuprofile, "profile-cpu", "", "", "write cpu profile to `file`")
|
||||||
cmd.Flags().StringVarP(&cc.memprofile, "profile-mem", "", "", "write memory profile to `file`")
|
cmd.Flags().StringVarP(&cc.memprofile, "profile-mem", "", "", "write memory profile to `file`")
|
||||||
cmd.Flags().BoolVarP(&cc.printm, "print-mem", "", false, "print memory usage to screen at intervals")
|
cmd.Flags().BoolVarP(&cc.printm, "printMemoryUsage", "", false, "print memory usage to screen at intervals")
|
||||||
cmd.Flags().StringVarP(&cc.mutexprofile, "profile-mutex", "", "", "write Mutex profile to `file`")
|
cmd.Flags().StringVarP(&cc.mutexprofile, "profile-mutex", "", "", "write Mutex profile to `file`")
|
||||||
cmd.Flags().StringVarP(&cc.traceprofile, "trace", "", "", "write trace to `file` (not useful in general)")
|
cmd.Flags().StringVarP(&cc.traceprofile, "trace", "", "", "write trace to `file` (not useful in general)")
|
||||||
|
|
||||||
|
|
|
@ -196,7 +196,7 @@ func TestFlags(t *testing.T) {
|
||||||
"--port=1366",
|
"--port=1366",
|
||||||
"--renderToDisk",
|
"--renderToDisk",
|
||||||
"--source=mysource",
|
"--source=mysource",
|
||||||
"--path-warnings",
|
"--printPathWarnings",
|
||||||
},
|
},
|
||||||
check: func(c *qt.C, sc *serverCmd) {
|
check: func(c *qt.C, sc *serverCmd) {
|
||||||
c.Assert(sc, qt.Not(qt.IsNil))
|
c.Assert(sc, qt.Not(qt.IsNil))
|
||||||
|
@ -220,7 +220,7 @@ func TestFlags(t *testing.T) {
|
||||||
|
|
||||||
c.Assert(cfg.GetBool("gc"), qt.Equals, true)
|
c.Assert(cfg.GetBool("gc"), qt.Equals, true)
|
||||||
|
|
||||||
// The flag is named path-warnings
|
// The flag is named printPathWarnings
|
||||||
c.Assert(cfg.GetBool("logPathWarnings"), qt.Equals, true)
|
c.Assert(cfg.GetBool("logPathWarnings"), qt.Equals, true)
|
||||||
|
|
||||||
// The flag is named i18n-warnings
|
// The flag is named i18n-warnings
|
||||||
|
|
|
@ -244,7 +244,7 @@ func initializeFlags(cmd *cobra.Command, cfg config.Provider) {
|
||||||
// Set some "config aliases"
|
// Set some "config aliases"
|
||||||
setValueFromFlag(cmd.Flags(), "destination", cfg, "publishDir", false)
|
setValueFromFlag(cmd.Flags(), "destination", cfg, "publishDir", false)
|
||||||
setValueFromFlag(cmd.Flags(), "i18n-warnings", cfg, "logI18nWarnings", false)
|
setValueFromFlag(cmd.Flags(), "i18n-warnings", cfg, "logI18nWarnings", false)
|
||||||
setValueFromFlag(cmd.Flags(), "path-warnings", cfg, "logPathWarnings", false)
|
setValueFromFlag(cmd.Flags(), "printPathWarnings", cfg, "logPathWarnings", false)
|
||||||
}
|
}
|
||||||
|
|
||||||
func setValueFromFlag(flags *flag.FlagSet, key string, cfg config.Provider, targetKey string, force bool) {
|
func setValueFromFlag(flags *flag.FlagSet, key string, cfg config.Provider, targetKey string, force bool) {
|
||||||
|
|
|
@ -50,9 +50,9 @@ hugo [flags]
|
||||||
--noChmod don't sync permission mode of files
|
--noChmod don't sync permission mode of files
|
||||||
--noTimes don't sync modification time of files
|
--noTimes don't sync modification time of files
|
||||||
--panicOnWarning panic on first WARNING log
|
--panicOnWarning panic on first WARNING log
|
||||||
--path-warnings print warnings on duplicate target paths etc.
|
|
||||||
--poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
|
--poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
|
||||||
--print-mem print memory usage to screen at intervals
|
--printMemoryUsage print memory usage to screen at intervals
|
||||||
|
--printPathWarnings print warnings on duplicate target paths etc.
|
||||||
--quiet build in quiet mode
|
--quiet build in quiet mode
|
||||||
--renderToMemory render to memory (only useful for benchmark testing)
|
--renderToMemory render to memory (only useful for benchmark testing)
|
||||||
-s, --source string filesystem path to read files relative from
|
-s, --source string filesystem path to read files relative from
|
||||||
|
|
|
@ -46,9 +46,9 @@ See https://gohugo.io/hugo-modules/ for more information.
|
||||||
--noChmod don't sync permission mode of files
|
--noChmod don't sync permission mode of files
|
||||||
--noTimes don't sync modification time of files
|
--noTimes don't sync modification time of files
|
||||||
--panicOnWarning panic on first WARNING log
|
--panicOnWarning panic on first WARNING log
|
||||||
--path-warnings print warnings on duplicate target paths etc.
|
|
||||||
--poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
|
--poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
|
||||||
--print-mem print memory usage to screen at intervals
|
--printMemoryUsage print memory usage to screen at intervals
|
||||||
|
--printPathWarnings print warnings on duplicate target paths etc.
|
||||||
--templateMetrics display metrics about template executions
|
--templateMetrics display metrics about template executions
|
||||||
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics
|
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics
|
||||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||||
|
|
|
@ -47,9 +47,9 @@ hugo new [path] [flags]
|
||||||
--noChmod don't sync permission mode of files
|
--noChmod don't sync permission mode of files
|
||||||
--noTimes don't sync modification time of files
|
--noTimes don't sync modification time of files
|
||||||
--panicOnWarning panic on first WARNING log
|
--panicOnWarning panic on first WARNING log
|
||||||
--path-warnings print warnings on duplicate target paths etc.
|
|
||||||
--poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
|
--poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
|
||||||
--print-mem print memory usage to screen at intervals
|
--printMemoryUsage print memory usage to screen at intervals
|
||||||
|
--printPathWarnings print warnings on duplicate target paths etc.
|
||||||
--templateMetrics display metrics about template executions
|
--templateMetrics display metrics about template executions
|
||||||
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics
|
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics
|
||||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||||
|
|
|
@ -59,10 +59,10 @@ hugo server [flags]
|
||||||
--noHTTPCache prevent HTTP caching
|
--noHTTPCache prevent HTTP caching
|
||||||
--noTimes don't sync modification time of files
|
--noTimes don't sync modification time of files
|
||||||
--panicOnWarning panic on first WARNING log
|
--panicOnWarning panic on first WARNING log
|
||||||
--path-warnings print warnings on duplicate target paths etc.
|
|
||||||
--poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
|
--poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
|
||||||
-p, --port int port on which the server will listen (default 1313)
|
-p, --port int port on which the server will listen (default 1313)
|
||||||
--print-mem print memory usage to screen at intervals
|
--printMemoryUsage print memory usage to screen at intervals
|
||||||
|
--printPathWarnings print warnings on duplicate target paths etc.
|
||||||
--renderToDisk render to Destination path (default is render to memory & serve from there)
|
--renderToDisk render to Destination path (default is render to memory & serve from there)
|
||||||
--templateMetrics display metrics about template executions
|
--templateMetrics display metrics about template executions
|
||||||
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics
|
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics
|
||||||
|
|
Loading…
Reference in a new issue