GoKit CLI
这个项目是 gk 的高级版本。gokit cli 的目标是成为一个可以在使用 gokit 开发微服务时使用的工具。虽然 gk 确实帮助您创建基本的文件夹结构,但它在项目中并不能得到进一步的使用。这就是 GoKit Cli 旨在改变的地方。
go get -u google.golang.org/grpc
go get -u github.com/golang/protobuf/protoc-gen-go在安装之前,请阅读 前提条件
go get github.com/kujtimiihoxha/kitkit help还请阅读这篇 中文故事
kit new service hello
kit n s hello # using aliases这将生成初始文件夹结构和服务接口
service-name/pkg/service/service.go
package service
// HelloService describes the service.
type HelloService interface {
// Add your methods here
// e.x: Foo(ctx context.Context,s string)(rs string, err error)
}kit g s hello
kit g s hello --dmw # to create the default middleware
kit g s hello -t grpc # specify the transport (default is http)此命令将执行以下操作
暂无开放 Issues,或尚未同步最近议题。