Skip to content

Commit 636d410

Browse files
committed
docs(command): unify style of usage statements
close: #1330
1 parent e218776 commit 636d410

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

cmd/command.go

+16-16
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func init() {
6868

6969
buildCmd.Flags().StringVarP(&buildDir, "build-dir", "b", "", "dir for build process")
7070

71-
upgradeCmd.Flags().StringVarP(&upgradeVersion, "from", "f", "", "upgrade from specific version, eg: -f v1.1.0")
71+
upgradeCmd.Flags().StringVarP(&upgradeVersion, "from", "f", "", "upgrade to the specific version from your input, eg: -f v1.1.0")
7272

7373
configCmd.Flags().StringSliceVarP(&configFields, "with", "w", []string{}, "the fields that need to be set to the default value, eg: -w allow_password_login")
7474

@@ -93,8 +93,8 @@ To run answer, use:
9393

9494
runCmd = &cobra.Command{
9595
Use: "run",
96-
Short: "Run the application",
97-
Long: `Run the application`,
96+
Short: "Run Answer",
97+
Long: `Start running Answer`,
9898
Run: func(_ *cobra.Command, _ []string) {
9999
cli.FormatAllPath(dataDirPath)
100100
fmt.Println("config file path: ", cli.GetConfigFilePath())
@@ -105,8 +105,8 @@ To run answer, use:
105105

106106
initCmd = &cobra.Command{
107107
Use: "init",
108-
Short: "init answer application",
109-
Long: `init answer application`,
108+
Short: "Initialize Answer",
109+
Long: `Initialize Answer with specified configuration`,
110110
Run: func(_ *cobra.Command, _ []string) {
111111
// check config file and database. if config file exists and database is already created, init done
112112
cli.InstallAllInitialEnvironment(dataDirPath)
@@ -134,8 +134,8 @@ To run answer, use:
134134

135135
upgradeCmd = &cobra.Command{
136136
Use: "upgrade",
137-
Short: "upgrade Answer version",
138-
Long: `upgrade Answer version`,
137+
Short: "Upgrade Answer",
138+
Long: `Upgrade Answer to the latest or a specific version`,
139139
Run: func(_ *cobra.Command, _ []string) {
140140
log.SetLogger(log.NewStdLogger(os.Stdout))
141141
cli.FormatAllPath(dataDirPath)
@@ -155,8 +155,8 @@ To run answer, use:
155155

156156
dumpCmd = &cobra.Command{
157157
Use: "dump",
158-
Short: "back up data",
159-
Long: `back up data`,
158+
Short: "Back up data",
159+
Long: `Back up database into an SQL file`,
160160
Run: func(_ *cobra.Command, _ []string) {
161161
fmt.Println("Answer is backing up data")
162162
cli.FormatAllPath(dataDirPath)
@@ -176,7 +176,7 @@ To run answer, use:
176176

177177
checkCmd = &cobra.Command{
178178
Use: "check",
179-
Short: "checking the required environment",
179+
Short: "Check the required environment",
180180
Long: `Check if the current environment meets the startup requirements`,
181181
Run: func(_ *cobra.Command, _ []string) {
182182
cli.FormatAllPath(dataDirPath)
@@ -210,7 +210,7 @@ To run answer, use:
210210

211211
buildCmd = &cobra.Command{
212212
Use: "build",
213-
Short: "used to build answer with plugins",
213+
Short: "Build Answer with plugins",
214214
Long: `Build a new Answer with plugins that you need`,
215215
Run: func(_ *cobra.Command, _ []string) {
216216
fmt.Printf("try to build a new answer with plugins:\n%s\n", strings.Join(buildWithPlugins, "\n"))
@@ -230,8 +230,8 @@ To run answer, use:
230230

231231
pluginCmd = &cobra.Command{
232232
Use: "plugin",
233-
Short: "prints all plugins packed in the binary",
234-
Long: `prints all plugins packed in the binary`,
233+
Short: "Print all plugins packed in the binary",
234+
Long: `Print all plugins packed in the binary`,
235235
Run: func(_ *cobra.Command, _ []string) {
236236
_ = plugin.CallBase(func(base plugin.Base) error {
237237
info := base.Info()
@@ -243,8 +243,8 @@ To run answer, use:
243243

244244
configCmd = &cobra.Command{
245245
Use: "config",
246-
Short: "set some config to default value",
247-
Long: `set some config to default value`,
246+
Short: "Set some config to default value",
247+
Long: `Set some config to default value`,
248248
Run: func(_ *cobra.Command, _ []string) {
249249
cli.FormatAllPath(dataDirPath)
250250

@@ -279,7 +279,7 @@ To run answer, use:
279279

280280
i18nCmd = &cobra.Command{
281281
Use: "i18n",
282-
Short: "overwrite i18n files",
282+
Short: "Overwrite i18n files",
283283
Long: `Merge i18n files from plugins to original i18n files. It will overwrite the original i18n files`,
284284
Run: func(_ *cobra.Command, _ []string) {
285285
if err := cli.ReplaceI18nFilesLocal(i18nTargetPath); err != nil {

0 commit comments

Comments
 (0)