diff options
author | Albert Nigmatzianov <albertnigma@gmail.com> | 2017-04-26 21:58:10 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-04-26 22:23:20 +0200 |
commit | f0f69d03c551acb8ac2eeedaad579cf0b596f9ef (patch) | |
tree | 542b5f1362a26c463925395bbaa9e49a170c429e /commands | |
parent | 8fbec5993034bb63d3583d26dfed973d8045d492 (diff) |
commands: Make first letter of flags' usage lowercase
Diffstat (limited to 'commands')
-rw-r--r-- | commands/genautocomplete.go | 4 | ||||
-rw-r--r-- | commands/gendocshelper.go | 2 | ||||
-rw-r--r-- | commands/hugo.go | 30 | ||||
-rw-r--r-- | commands/import_jekyll.go | 2 | ||||
-rw-r--r-- | commands/new.go | 4 | ||||
-rw-r--r-- | commands/release.go | 6 |
6 files changed, 24 insertions, 24 deletions
diff --git a/commands/genautocomplete.go b/commands/genautocomplete.go index e49064467..c2004ab22 100644 --- a/commands/genautocomplete.go +++ b/commands/genautocomplete.go @@ -62,8 +62,8 @@ or just source them in directly: } func init() { - genautocompleteCmd.PersistentFlags().StringVarP(&autocompleteTarget, "completionfile", "", "/etc/bash_completion.d/hugo.sh", "Autocompletion file") - genautocompleteCmd.PersistentFlags().StringVarP(&autocompleteType, "type", "", "bash", "Autocompletion type (currently only bash supported)") + genautocompleteCmd.PersistentFlags().StringVarP(&autocompleteTarget, "completionfile", "", "/etc/bash_completion.d/hugo.sh", "autocompletion file") + genautocompleteCmd.PersistentFlags().StringVarP(&autocompleteType, "type", "", "bash", "autocompletion type (currently only bash supported)") // For bash-completion genautocompleteCmd.PersistentFlags().SetAnnotation("completionfile", cobra.BashCompFilenameExt, []string{}) diff --git a/commands/gendocshelper.go b/commands/gendocshelper.go index 245c5f221..a5080687f 100644 --- a/commands/gendocshelper.go +++ b/commands/gendocshelper.go @@ -41,7 +41,7 @@ func createGenDocsHelper() *genDocsHelper { return g.generate() } - g.cmd.PersistentFlags().StringVarP(&g.target, "dir", "", "docs/data", "Data dir") + g.cmd.PersistentFlags().StringVarP(&g.target, "dir", "", "docs/data", "data dir") return g } diff --git a/commands/hugo.go b/commands/hugo.go index 4260f6e56..ce246efd0 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -218,35 +218,35 @@ func initRootPersistentFlags() { // initHugoBuildCommonFlags initialize common flags related to the Hugo build. // Called by initHugoBuilderFlags. func initHugoBuildCommonFlags(cmd *cobra.Command) { - cmd.Flags().Bool("cleanDestinationDir", false, "Remove files from destination not found in static directories") + cmd.Flags().Bool("cleanDestinationDir", false, "remove files from destination not found in static directories") cmd.Flags().BoolP("buildDrafts", "D", false, "include content marked as draft") cmd.Flags().BoolP("buildFuture", "F", false, "include content with publishdate in the future") cmd.Flags().BoolP("buildExpired", "E", false, "include expired content") - cmd.Flags().Bool("disable404", false, "Do not render 404 page") - cmd.Flags().Bool("disableRSS", false, "Do not build RSS files") - cmd.Flags().Bool("disableSitemap", false, "Do not build Sitemap file") + cmd.Flags().Bool("disable404", false, "do not render 404 page") + cmd.Flags().Bool("disableRSS", false, "do not build RSS files") + cmd.Flags().Bool("disableSitemap", false, "do not build Sitemap file") cmd.Flags().StringVarP(&source, "source", "s", "", "filesystem path to read files relative from") cmd.Flags().StringVarP(&contentDir, "contentDir", "c", "", "filesystem path to content directory") cmd.Flags().StringVarP(&layoutDir, "layoutDir", "l", "", "filesystem path to layout directory") cmd.Flags().StringVarP(&cacheDir, "cacheDir", "", "", "filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/") - cmd.Flags().BoolP("ignoreCache", "", false, "Ignores the cache directory") + cmd.Flags().BoolP("ignoreCache", "", false, "ignores the cache directory") cmd.Flags().StringVarP(&destination, "destination", "d", "", "filesystem path to write files to") cmd.Flags().StringVarP(&theme, "theme", "t", "", "theme to use (located in /themes/THEMENAME/)") cmd.Flags().StringVarP(&themesDir, "themesDir", "", "", "filesystem path to themes directory") cmd.Flags().Bool("uglyURLs", false, "if true, use /filename.html instead of /filename/") cmd.Flags().Bool("canonifyURLs", false, "if true, all relative URLs will be canonicalized using baseURL") cmd.Flags().StringVarP(&baseURL, "baseURL", "b", "", "hostname (and path) to the root, e.g. http://spf13.com/") - cmd.Flags().Bool("enableGitInfo", false, "Add Git revision, date and author info to the pages") + cmd.Flags().Bool("enableGitInfo", false, "add Git revision, date and author info to the pages") cmd.Flags().BoolVar(&nitro.AnalysisOn, "stepAnalysis", false, "display memory and timing of different steps of the program") - cmd.Flags().Bool("pluralizeListTitles", true, "Pluralize titles in lists using inflect") - cmd.Flags().Bool("preserveTaxonomyNames", false, `Preserve taxonomy names as written ("Gérard Depardieu" vs "gerard-depardieu")`) - cmd.Flags().BoolP("forceSyncStatic", "", false, "Copy all files when static is changed.") - 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().BoolVarP(&logI18nWarnings, "i18n-warnings", "", false, "Print missing translations") + cmd.Flags().Bool("pluralizeListTitles", true, "pluralize titles in lists using inflect") + cmd.Flags().Bool("preserveTaxonomyNames", false, `preserve taxonomy names as written ("Gérard Depardieu" vs "gerard-depardieu")`) + cmd.Flags().BoolP("forceSyncStatic", "", false, "copy all files when static is changed.") + 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().BoolVarP(&logI18nWarnings, "i18n-warnings", "", false, "print missing translations") - cmd.Flags().StringSliceVar(&disableKinds, "disableKinds", []string{}, "Disable different kind of pages (home, RSS etc.)") + cmd.Flags().StringSliceVar(&disableKinds, "disableKinds", []string{}, "disable different kind of pages (home, RSS etc.)") // Set bash-completion. // Each flag must first be defined before using the SetAnnotation() call. @@ -263,8 +263,8 @@ func initBenchmarkBuildingFlags(cmd *cobra.Command) { // init initializes flags. func init() { HugoCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "verbose output") - HugoCmd.PersistentFlags().BoolVar(&logging, "log", false, "Enable Logging") - HugoCmd.PersistentFlags().StringVar(&logFile, "logFile", "", "Log File path (if set, logging enabled automatically)") + HugoCmd.PersistentFlags().BoolVar(&logging, "log", false, "enable Logging") + HugoCmd.PersistentFlags().StringVar(&logFile, "logFile", "", "log File path (if set, logging enabled automatically)") HugoCmd.PersistentFlags().BoolVar(&verboseLog, "verboseLog", false, "verbose logging") initRootPersistentFlags() diff --git a/commands/import_jekyll.go b/commands/import_jekyll.go index 7d503466e..a7524c1a4 100644 --- a/commands/import_jekyll.go +++ b/commands/import_jekyll.go @@ -58,7 +58,7 @@ Import from Jekyll requires two paths, e.g. ` + "`hugo import jekyll jekyll_root } func init() { - importJekyllCmd.Flags().Bool("force", false, "Allow import into non-empty target directory") + importJekyllCmd.Flags().Bool("force", false, "allow import into non-empty target directory") } func importFromJekyll(cmd *cobra.Command, args []string) error { diff --git a/commands/new.go b/commands/new.go index 2fa308ed6..a1a2e098c 100644 --- a/commands/new.go +++ b/commands/new.go @@ -41,9 +41,9 @@ var ( func init() { newSiteCmd.Flags().StringVarP(&configFormat, "format", "f", "toml", "config & frontmatter format") - newSiteCmd.Flags().Bool("force", false, "Init inside non-empty directory") + newSiteCmd.Flags().Bool("force", false, "init inside non-empty directory") newCmd.Flags().StringVarP(&configFormat, "format", "f", "toml", "frontmatter format") - newCmd.Flags().StringVarP(&contentType, "kind", "k", "", "Content type to create") + newCmd.Flags().StringVarP(&contentType, "kind", "k", "", "content type to create") newCmd.PersistentFlags().StringVarP(&source, "source", "s", "", "filesystem path to read files relative from") newCmd.PersistentFlags().SetAnnotation("source", cobra.BashCompSubdirsInDir, []string{}) newCmd.Flags().StringVar(&contentEditor, "editor", "", "edit new content with this editor, if provided") diff --git a/commands/release.go b/commands/release.go index f6d98e29f..6c14c5d8b 100644 --- a/commands/release.go +++ b/commands/release.go @@ -50,9 +50,9 @@ func createReleaser() *releaseCommandeer { return r.release() } - r.cmd.PersistentFlags().IntVarP(&r.patchLevel, "patch", "p", 0, "Patch level, defaults to 0 for main releases") - r.cmd.PersistentFlags().IntVarP(&r.step, "step", "s", -1, "Release step, defaults to -1 for all steps.") - r.cmd.PersistentFlags().BoolVarP(&r.skipPublish, "skip-publish", "", false, "Skip all publishing pipes of the release") + r.cmd.PersistentFlags().IntVarP(&r.patchLevel, "patch", "p", 0, "patch level, defaults to 0 for main releases") + r.cmd.PersistentFlags().IntVarP(&r.step, "step", "s", -1, "release step, defaults to -1 for all steps.") + r.cmd.PersistentFlags().BoolVarP(&r.skipPublish, "skip-publish", "", false, "skip all publishing pipes of the release") return r } |