Commit 737a9fcf authored by Mattia Bertorello's avatar Mattia Bertorello

Apply style 2 in the flags (a line break before the description)...

Apply style 2 in the flags (a line break before the description) https://github.com/arduino/arduino-cli/pull/24#discussion_r213709753
parent cd95478c
......@@ -39,8 +39,9 @@ func initListCommand() *cobra.Command {
Args: cobra.NoArgs,
Run: runListCommand,
}
usage := "The timeout of the search of connected devices, try to high it if your board is not found (e.g. to 10s)."
listCommand.Flags().StringVar(&listFlags.timeout, "timeout", "5s", usage)
listCommand.Flags().StringVar(&listFlags.timeout, "timeout", "5s",
"The timeout of the search of connected devices, try to high it if your board is not found (e.g. to 10s).")
return listCommand
}
......
......@@ -39,13 +39,9 @@ func initInitCommand() *cobra.Command {
Args: cobra.NoArgs,
Run: runInitCommand,
}
initCommand.Flags().BoolVar(&initFlags._default,
"default",
false,
initCommand.Flags().BoolVar(&initFlags._default, "default", false,
"If omitted, ask questions to the user about setting configuration properties, otherwise use default configuration.")
initCommand.Flags().StringVar(&initFlags.location,
"save-as",
"",
initCommand.Flags().StringVar(&initFlags.location, "save-as", "",
"Sets where to save the configuration file [default is ./.cli-config.yml].")
return initCommand
}
......
......@@ -45,10 +45,14 @@ func InitCommand() *cobra.Command {
Args: cobra.MaximumNArgs(1),
Run: run,
}
uploadCommand.Flags().StringVarP(&flags.fqbn, "fqbn", "b", "", "Fully Qualified Board Name, e.g.: arduino:avr:uno")
uploadCommand.Flags().StringVarP(&flags.port, "port", "p", "", "Upload port, e.g.: COM10 or /dev/ttyACM0")
uploadCommand.Flags().BoolVarP(&flags.verbose, "verify", "t", false, "Verify uploaded binary after the upload.")
uploadCommand.Flags().BoolVarP(&flags.verbose, "verbose", "v", false, "Optional, turns on verbose mode.")
uploadCommand.Flags().StringVarP(&flags.fqbn, "fqbn", "b", "",
"Fully Qualified Board Name, e.g.: arduino:avr:uno")
uploadCommand.Flags().StringVarP(&flags.port, "port", "p", "",
"Upload port, e.g.: COM10 or /dev/ttyACM0")
uploadCommand.Flags().BoolVarP(&flags.verbose, "verify", "t", false,
"Verify uploaded binary after the upload.")
uploadCommand.Flags().BoolVarP(&flags.verbose, "verbose", "v", false,
"Optional, turns on verbose mode.")
return uploadCommand
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment