lile安装和使用

博主探索了一个早上终于学会了使用lile.

https://github.com/lileio/lile

lile是什么?

简单将就是生成目录用的,主要的功能是生成项目目录和proto的service实现。

博主太菜了,第一次使用go get 和go install 安装包。所以记录一下,let's go!

 

go get github.com/lileio/lile

find / -name lile

然后cd 进去,博主目录如下:

/root/go/pkg/mod/github.com/lileio/lile@v0.0.0-20190923215044-149adffdc7ae/lile

cd /root/go/pkg/mod/github.com/lileio/lile@v0.0.0-20190923215044-149adffdc7ae/lile

go install
cd ..

cd protoc-gen-lile-server

go install

注意go install 只能是main.go的地方执行。

install好了执行lile就会看到:

Usage:
  lile [command]

Available Commands:
  help        Help about any command
  new         Create a new service

Flags:
  -h, --help   help for lile

使用部分:

lile new --name bigPkgName/thisPkgName

就会在大项目下创建名字为thisPkgName的grpc微服务

然后

cd thisPkgName

执行

make proto

就会生成

proto 的pb文件和service实现

提高了效率,使得大家更有时间摸鱼hhh

 

 

 

 

 



 
 
posted @ 2020-09-19 12:31  埃姆提斯  阅读(467)  评论(0)    收藏  举报