diff --git a/commands/hugo.go b/commands/hugo.go index 804817478..67ca8f19d 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -65,7 +65,7 @@ var Source, CacheDir, Destination, Theme, BaseURL, CfgFile, LogFile, Editor stri //Execute adds all child commands to the root command HugoCmd and sets flags appropriately. func Execute() { - HugoCmd.SetGlobalNormalizationFunc(helpers.NormalizeHugoFlagsFunc) + HugoCmd.SetGlobalNormalizationFunc(helpers.NormalizeHugoFlags) AddCommands() utils.StopOnErr(HugoCmd.Execute()) } diff --git a/helpers/general.go b/helpers/general.go index d97c78454..5b5778b8c 100644 --- a/helpers/general.go +++ b/helpers/general.go @@ -432,7 +432,7 @@ func DoArithmetic(a, b interface{}, op rune) (interface{}, error) { // NormalizeHugoFlagsFunc facilitates transitions of Hugo command-line flags, // e.g. --baseUrl to --baseURL, --uglyUrls to --uglyURLs -func NormalizeHugoFlagsFunc(f *pflag.FlagSet, name string) pflag.NormalizedName { +func NormalizeHugoFlags(f *pflag.FlagSet, name string) pflag.NormalizedName { switch name { case "baseUrl": name = "baseURL"