Skip to content

Commit

Permalink
refactor: cmd update.
Browse files Browse the repository at this point in the history
  • Loading branch information
FGadvancer committed Apr 12, 2024
1 parent 9857ea2 commit a447748
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/common/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,13 @@ func WithConfigMap(configMap map[string]any) func(*CmdOpts) {
func NewRootCmd(processName string, opts ...func(*CmdOpts)) *RootCmd {
rootCmd := &RootCmd{processName: processName}
cmd := cobra.Command{
Use: "Start openIM application",
Short: fmt.Sprintf(`Start %s `, processName),
Long: fmt.Sprintf(`Start %s `, processName),
Use: "Start openIM application",
Long: fmt.Sprintf(`Start %s `, processName),
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
return rootCmd.persistentPreRun(cmd, opts...)
},
SilenceUsage: true,
SilenceErrors: true,
SilenceErrors: false,
}
cmd.Flags().StringP(FlagConf, "c", "", "path of config directory")
cmd.Flags().IntP(FlagTransferIndex, "i", 0, "process startup sequence number")
Expand Down

0 comments on commit a447748

Please sign in to comment.