We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4ce80c commit cf9020bCopy full SHA for cf9020b
main.go
@@ -78,10 +78,16 @@ func main() {
78
TimeEncoder: zapcore.TimeEncoderOfLayout(time.RFC3339),
79
}
80
81
- flagSet := flag.CommandLine
+ flagSet := flag.NewFlagSet(os.Args[0], flag.ExitOnError)
82
+ flag.CommandLine.VisitAll(func(f *flag.Flag) {
83
+ if f.Name != "kubeconfig" {
84
+ flagSet.Var(f.Value, f.Name, f.Usage)
85
+ }
86
+ })
87
+
88
zapOptions.BindFlags(flagSet)
89
mcadOptions.AddFlags(flagSet)
- flag.Parse()
90
+ _ = flagSet.Parse(os.Args[1:])
91
92
ctrl.SetLogger(zap.New(zap.UseFlagOptions(&zapOptions)))
93
0 commit comments