//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())
}
// 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"