Uploaded image for project: 'Apache YuniKorn'
  1. Apache YuniKorn
  2. YUNIKORN-1277

Simplify command line processing code

    XMLWordPrintableJSON

Details

    Description

      Currently, we parse flags (cmd line args) like this:

      kubeConfig := flag.String("kubeConfig", "",
      		"absolute path to the kubeconfig file")
      

      but there's a simpler version without the need of an extra variable:

      conf := &SchedulerConf{
        SchedulerName:  constants.SchedulerName,
      }
      
      flag.StringVar(&conf.KubeConfig, "kubeConfig", "",
      		"absolute path to the kubeconfig file")
      ...
      

      Attachments

        Issue Links

          Activity

            People

              pbacsko Peter Bacsko
              pbacsko Peter Bacsko
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: