Warn for every _ flag user or cmd defined

also renames all global _ flags to -
This commit is contained in:
Anastasis Andronidis
2015-05-16 18:44:42 +02:00
parent a1ea3df0f1
commit 5eae2378d6
63 changed files with 272 additions and 215 deletions

View File

@@ -21,6 +21,7 @@ import (
cmdconfig "github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd/config"
cmdutil "github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/golang/glog"
"github.com/spf13/cobra"
@@ -107,6 +108,9 @@ Find more information at https://github.com/GoogleCloudPlatform/kubernetes.`,
f.BindFlags(cmds.PersistentFlags())
// From this point and forward we get warnings on flags that contain "_" separators
cmds.SetGlobalNormalizationFunc(util.WarnWordSepNormalizeFunc)
cmds.AddCommand(NewCmdGet(f, out))
cmds.AddCommand(NewCmdDescribe(f, out))
cmds.AddCommand(NewCmdCreate(f, out))