mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 18:58:18 +00:00
Move flag into sub pkg
This commit is contained in:
@@ -29,6 +29,7 @@ import (
|
||||
"runtime"
|
||||
|
||||
"k8s.io/kubernetes/pkg/util"
|
||||
utilflag "k8s.io/kubernetes/pkg/util/flag"
|
||||
"k8s.io/kubernetes/pkg/version/verflag"
|
||||
|
||||
"github.com/spf13/pflag"
|
||||
@@ -72,7 +73,7 @@ func (hk *HyperKube) Flags() *pflag.FlagSet {
|
||||
if hk.baseFlags == nil {
|
||||
hk.baseFlags = pflag.NewFlagSet(hk.Name, pflag.ContinueOnError)
|
||||
hk.baseFlags.SetOutput(ioutil.Discard)
|
||||
hk.baseFlags.SetNormalizeFunc(util.WordSepNormalizeFunc)
|
||||
hk.baseFlags.SetNormalizeFunc(utilflag.WordSepNormalizeFunc)
|
||||
hk.baseFlags.BoolVarP(&hk.helpFlagVal, "help", "h", false, "help for "+hk.Name)
|
||||
|
||||
// These will add all of the "global" flags (defined with both the
|
||||
|
||||
@@ -23,6 +23,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"k8s.io/kubernetes/pkg/util"
|
||||
"k8s.io/kubernetes/pkg/util/flag"
|
||||
|
||||
"github.com/spf13/pflag"
|
||||
)
|
||||
@@ -70,7 +71,7 @@ func (s *Server) Flags() *pflag.FlagSet {
|
||||
if s.flags == nil {
|
||||
s.flags = pflag.NewFlagSet(s.Name(), pflag.ContinueOnError)
|
||||
s.flags.SetOutput(ioutil.Discard)
|
||||
s.flags.SetNormalizeFunc(util.WordSepNormalizeFunc)
|
||||
s.flags.SetNormalizeFunc(flag.WordSepNormalizeFunc)
|
||||
}
|
||||
return s.flags
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user