rpc

package
v0.0.0-...-e5591e2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2023 License: MIT Imports: 16 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL