You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by "Peter Bacsko (Jira)" <ji...@apache.org> on 2022/08/04 19:31:00 UTC

[jira] [Updated] (YUNIKORN-1277) Simplify command line processing code

     [ https://issues.apache.org/jira/browse/YUNIKORN-1277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Bacsko updated YUNIKORN-1277:
-----------------------------------
    Summary: Simplify command line processing code  (was: Simplify flag parsing code)

> Simplify command line processing 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
>            Priority: Major
>
> 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: issues-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: issues-help@yunikorn.apache.org