You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@yunikorn.apache.org by "Peter Bacsko (Jira)" <ji...@apache.org> on 2022/08/04 19:30:00 UTC
[jira] [Created] (YUNIKORN-1277) Simplify flag parsing code
Peter Bacsko created YUNIKORN-1277:
--------------------------------------
Summary: Simplify flag parsing code
Key: YUNIKORN-1277
URL: https://issues.apache.org/jira/browse/YUNIKORN-1277
Project: Apache YuniKorn
Issue Type: Improvement
Components: shim - kubernetes
Reporter: Peter Bacsko
Assignee: Peter Bacsko
Currently, we parse flags (cmd line args) like this:
{noformat}
kubeConfig := flag.String("kubeConfig", "",
"absolute path to the kubeconfig file")
{noformat}
but there's a simpler version without the need of an extra variable:
{noformat}
conf := &SchedulerConf{
SchedulerName: constants.SchedulerName,
}
flag.StringVar(&conf.KubeConfig, "kubeConfig", "",
"absolute path to the kubeconfig file")
...
{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: dev-help@yunikorn.apache.org