mirror of https://gitee.com/answerdev/answer.git
style: root add command by command array
This commit is contained in:
parent
82ab33ee91
commit
258985ee2b
|
@ -27,11 +27,9 @@ func init() {
|
|||
|
||||
dumpCmd.Flags().StringVarP(&dumpDataPath, "path", "p", "./", "dump data path, eg: -p ./dump/data/")
|
||||
|
||||
rootCmd.AddCommand(initCmd)
|
||||
rootCmd.AddCommand(checkCmd)
|
||||
rootCmd.AddCommand(runCmd)
|
||||
rootCmd.AddCommand(dumpCmd)
|
||||
rootCmd.AddCommand(upgradeCmd)
|
||||
for _, cmd := range []*cobra.Command{initCmd, checkCmd, runCmd, dumpCmd, upgradeCmd} {
|
||||
rootCmd.AddCommand(cmd)
|
||||
}
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
Loading…
Reference in New Issue