Skip to content

Commit f00050b

Browse files
author
Mattia Bertorello
committed
Apply style 2 in the flags (a line break before the description) #24 (comment)
1 parent cf733e8 commit f00050b

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

Diff for: commands/board/list.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ func initListCommand() *cobra.Command {
3939
Args: cobra.NoArgs,
4040
Run: runListCommand,
4141
}
42-
usage := "The timeout of the search of connected devices, try to high it if your board is not found (e.g. to 10s)."
43-
listCommand.Flags().StringVar(&listFlags.timeout, "timeout", "5s", usage)
42+
43+
listCommand.Flags().StringVar(&listFlags.timeout, "timeout", "5s",
44+
"The timeout of the search of connected devices, try to high it if your board is not found (e.g. to 10s).")
4445
return listCommand
4546
}
4647

Diff for: commands/config/init.go

+2-6
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,9 @@ func initInitCommand() *cobra.Command {
3939
Args: cobra.NoArgs,
4040
Run: runInitCommand,
4141
}
42-
initCommand.Flags().BoolVar(&initFlags._default,
43-
"default",
44-
false,
42+
initCommand.Flags().BoolVar(&initFlags._default, "default", false,
4543
"If omitted, ask questions to the user about setting configuration properties, otherwise use default configuration.")
46-
initCommand.Flags().StringVar(&initFlags.location,
47-
"save-as",
48-
"",
44+
initCommand.Flags().StringVar(&initFlags.location, "save-as", "",
4945
"Sets where to save the configuration file [default is ./.cli-config.yml].")
5046
return initCommand
5147
}

Diff for: commands/upload/upload.go

+8-4
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,14 @@ func InitCommand() *cobra.Command {
4545
Args: cobra.MaximumNArgs(1),
4646
Run: run,
4747
}
48-
uploadCommand.Flags().StringVarP(&flags.fqbn, "fqbn", "b", "", "Fully Qualified Board Name, e.g.: arduino:avr:uno")
49-
uploadCommand.Flags().StringVarP(&flags.port, "port", "p", "", "Upload port, e.g.: COM10 or /dev/ttyACM0")
50-
uploadCommand.Flags().BoolVarP(&flags.verbose, "verify", "t", false, "Verify uploaded binary after the upload.")
51-
uploadCommand.Flags().BoolVarP(&flags.verbose, "verbose", "v", false, "Optional, turns on verbose mode.")
48+
uploadCommand.Flags().StringVarP(&flags.fqbn, "fqbn", "b", "",
49+
"Fully Qualified Board Name, e.g.: arduino:avr:uno")
50+
uploadCommand.Flags().StringVarP(&flags.port, "port", "p", "",
51+
"Upload port, e.g.: COM10 or /dev/ttyACM0")
52+
uploadCommand.Flags().BoolVarP(&flags.verbose, "verify", "t", false,
53+
"Verify uploaded binary after the upload.")
54+
uploadCommand.Flags().BoolVarP(&flags.verbose, "verbose", "v", false,
55+
"Optional, turns on verbose mode.")
5256
return uploadCommand
5357
}
5458

0 commit comments

Comments
 (0)