remove command support

This commit is contained in:
yanghao05
2023-05-12 12:59:53 +08:00
parent 7bbf6c1684
commit 630a78529e
5 changed files with 38 additions and 50 deletions

View File

@@ -34,7 +34,7 @@ func Serve(providers container.Providers, opts ...Option) error {
rootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "c", "", "config file path, lookup in dir: $HOME, $PWD, /etc, /usr/local/etc, filename: "+defaultCfgFile)
rootCmd.PersistentPreRunE = func(cmd *cobra.Command, args []string) error {
return LoadProviders(cfgFile, cmd.Use, providers)
return LoadProviders(cfgFile, rootCmd.Use, providers)
}
withMigrationCommand(rootCmd)