Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "rpc", Short: "生成 rpc 接口", Long: `脚手架功能: - 生成 rpc/**/*.proto 模版 - 生成 rpc/**/*.go - 生成 rpc/**/*.pb.go - 生成 rpc/**/*.twirp.go - 注册接口到 http server`, Run: func(cmd *cobra.Command, args []string) { if !isSniperDir() { color.Red("只能在 sniper 项目根目录运行!") os.Exit(1) } if service == "" { service = server } genProto() genOrUpdateServer() registerServer() }, }
Cmd 接口生成工具
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.