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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to