mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-24 09:40:24 +08:00
5383e29ce6
* Replace cli * Replace cli * Replace cli * Format code * Add compare case * Add compare case * Add compare case * Support go style flag * Support go style flag * Add test case
24 lines
641 B
Go
24 lines
641 B
Go
package migrate
|
|
|
|
import "github.com/spf13/cobra"
|
|
|
|
var (
|
|
boolVarVerbose bool
|
|
stringVarVersion string
|
|
// Cmd describes a migrate command.
|
|
Cmd = &cobra.Command{
|
|
Use: "migrate",
|
|
Short: "Migrate from tal-tech to zeromicro",
|
|
Long: "Migrate is a transition command to help users migrate their " +
|
|
"projects from tal-tech to zeromicro version",
|
|
RunE: migrate,
|
|
}
|
|
)
|
|
|
|
func init() {
|
|
Cmd.Flags().BoolVarP(&boolVarVerbose, "verbose", "v",
|
|
false, "Verbose enables extra logging")
|
|
Cmd.Flags().StringVar(&stringVarVersion, "version", defaultMigrateVersion,
|
|
"The target release version of github.com/zeromicro/go-zero to migrate")
|
|
}
|