Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EnumCmd = &cobra.Command{ Use: "enum", Short: "枚举生成器", Long: `枚举生成器`, RunE: func(cmd *cobra.Command, args []string) error { code, err := enum.G.Generate() if err != nil { return err } fname := os.Getenv("GOFILE") genFile := fname[0:len(fname)-len(path.Ext(fname))] + "_generate.go" ioutil.WriteFile(genFile, code, 0644) return nil }, }
EnumCmd 枚举生成器
View Source
var InitCmd = &cobra.Command{ Use: "init", Short: "初始化", Long: `初始化一个mcube项目`, RunE: func(cmd *cobra.Command, args []string) error { p, err := project.LoadConfigFromCLI() if err != nil { return err } err = p.Init() if err != nil { return err } return nil }, }
InitCmd 初始化系统
View Source
var RootCmd = &cobra.Command{ Use: "mcube", Short: "mcube 分布式服务构建工具", Long: `mcube ...`, RunE: func(cmd *cobra.Command, args []string) error { return errors.New("no flags find") }, }
RootCmd represents the base command when called without any subcommands
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.