What this PR does / why we need it:
In pflag pkg, when user uses --help but there is no help flag defined the library returns pflag.ErrHelp error and exits.
Output before the change:
Usage of murre:
--container string filter by container
--interval duration seconds to wait between updates (default '5s') (default 5s)
--kubeconfig string (optional) absolute path to the kubeconfig file (default "/home/max/.kube/config")
--namespace string filter by namespace
--pod string filter by pod
--sortby-cpu sort by cpu
--sortby-cpu-util sort by cpu utilization
--sortby-mem sort by memory
--sortby-mem-util sort by memory utilization
pflag: help requested
exit status 2
Output after the change:
Usage: murre [options]
--container string filter by container
--help show help
--interval duration seconds to wait between updates (default '5s') (default 5s)
--kubeconfig string (optional) absolute path to the kubeconfig file (default "/home/max/.kube/config")
--namespace string filter by namespace
--pod string filter by pod
--sortby-cpu sort by cpu
--sortby-cpu-util sort by cpu utilization
--sortby-mem sort by memory
--sortby-mem-util sort by memory utilization
What this PR does / why we need it: In
pflag
pkg, when user uses--help
but there is nohelp
flag defined the library returnspflag.ErrHelp
error and exits.Output before the change:
Output after the change:
Which issue(s) this PR fixes:
7
Special notes for your reviewer: