Skip to content

Commit

Permalink
Inline method
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumerose authored and praveenkumar committed Sep 14, 2020
1 parent cc258c0 commit 7f6c908
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions cmd/crc/cmd/start.go
Expand Up @@ -25,7 +25,16 @@ import (
func init() {
rootCmd.AddCommand(startCmd)
addOutputFormatFlag(startCmd)
startCmd.Flags().AddFlagSet(startCmdFlagSet)

flagSet := pflag.NewFlagSet("start", pflag.ExitOnError)
flagSet.StringP(config.Bundle.Name, "b", constants.DefaultBundlePath, "The system bundle used for deployment of the OpenShift cluster")
flagSet.StringP(config.PullSecretFile.Name, "p", "", fmt.Sprintf("File path of image pull secret (download from %s)", constants.CrcLandingPageURL))
flagSet.IntP(config.CPUs.Name, "c", constants.DefaultCPUs, "Number of CPU cores to allocate to the OpenShift cluster")
flagSet.IntP(config.Memory.Name, "m", constants.DefaultMemory, "MiB of memory to allocate to the OpenShift cluster")
flagSet.StringP(config.NameServer.Name, "n", "", "IPv4 address of nameserver to use for the OpenShift cluster")
flagSet.Bool(config.DisableUpdateCheck.Name, false, "Don't check for update")

startCmd.Flags().AddFlagSet(flagSet)

_ = crcConfig.BindFlagSet(startCmd.Flags())
}
Expand Down Expand Up @@ -137,18 +146,6 @@ func (s *startResult) prettyPrintTo(writer io.Writer) error {
return err
}

func initStartCmdFlagSet() *pflag.FlagSet {
flagSet := pflag.NewFlagSet("start", pflag.ExitOnError)
flagSet.StringP(config.Bundle.Name, "b", constants.DefaultBundlePath, "The system bundle used for deployment of the OpenShift cluster")
flagSet.StringP(config.PullSecretFile.Name, "p", "", fmt.Sprintf("File path of image pull secret (download from %s)", constants.CrcLandingPageURL))
flagSet.IntP(config.CPUs.Name, "c", constants.DefaultCPUs, "Number of CPU cores to allocate to the OpenShift cluster")
flagSet.IntP(config.Memory.Name, "m", constants.DefaultMemory, "MiB of memory to allocate to the OpenShift cluster")
flagSet.StringP(config.NameServer.Name, "n", "", "IPv4 address of nameserver to use for the OpenShift cluster")
flagSet.Bool(config.DisableUpdateCheck.Name, false, "Don't check for update")

return flagSet
}

func isDebugLog() bool {
return logging.LogLevel == "debug"
}
Expand Down

0 comments on commit 7f6c908

Please sign in to comment.