`kratos tool protoc --grpc --bm api.proto
2020/04/15 17:33:32 protoc --proto_path=/Users/jelty/data/GoPath/src --proto_path=/Users/jelty/data/GoPath/pkg/mod/github.com/go-kratos/kratos@v0.4.3-0.20200408075623-52cb7ec27f60/third_party --proto_path=/Users/jelty/data/GoPath/src/kratos-demo/api --bm_out=:. api.proto
api.proto: File does not reside within any path specified using --proto_path (or -I). You must specify a --proto_path which encompasses this file. Note that the proto_path must be an exact prefix of the .proto file names -- protoc is too dumb to figure out when two paths (e.g. absolute and relative) are equivalent (it's harder than you think).
exit status 1
exit status 1
kratos tool genbts
Close: 无声明 忽略此方法
Ping: 无声明 忽略此方法
dao.bts.go: 生成成功
kratos tool genmc
mc.cache.go: 生成成功
kratos tool wire
wire: /Users/jelty/data/GoPath/src/kratos-demo/internal/service/service.go:15:33: first argument to Bind must be a pointer to an interface type; found
wire: kratos-demo/internal/di: generate failed
wire: at least one generate failure
exit status 1
kratos tool wire
wire: kratos-demo/internal/dao: wrote /Users/jelty/data/GoPath/src/kratos-demo/internal/dao/wire_gen.go
Project: kratos-demo
OnlyGRPC: false
OnlyHTTP: false
Directory: /Users/jelty/data/GoPath/src/kratos-demo
项目创建成功.`
jelty@jeltydeMBP:~/data/GoPath/src/kratos-demo/cmd|
⇒ go build
`kratos tool protoc --grpc --bm api.proto 2020/04/15 17:33:32 protoc --proto_path=/Users/jelty/data/GoPath/src --proto_path=/Users/jelty/data/GoPath/pkg/mod/github.com/go-kratos/kratos@v0.4.3-0.20200408075623-52cb7ec27f60/third_party --proto_path=/Users/jelty/data/GoPath/src/kratos-demo/api --bm_out=:. api.proto api.proto: File does not reside within any path specified using --proto_path (or -I). You must specify a --proto_path which encompasses this file. Note that the proto_path must be an exact prefix of the .proto file names -- protoc is too dumb to figure out when two paths (e.g. absolute and relative) are equivalent (it's harder than you think). exit status 1 exit status 1 kratos tool genbts Close: 无声明 忽略此方法 Ping: 无声明 忽略此方法 dao.bts.go: 生成成功 kratos tool genmc mc.cache.go: 生成成功 kratos tool wire wire: /Users/jelty/data/GoPath/src/kratos-demo/internal/service/service.go:15:33: first argument to Bind must be a pointer to an interface type; found
wire: kratos-demo/internal/di: generate failed
wire: at least one generate failure
exit status 1
kratos tool wire
wire: kratos-demo/internal/dao: wrote /Users/jelty/data/GoPath/src/kratos-demo/internal/dao/wire_gen.go
Project: kratos-demo
OnlyGRPC: false
OnlyHTTP: false
Directory: /Users/jelty/data/GoPath/src/kratos-demo
项目创建成功.`
jelty@jeltydeMBP:~/data/GoPath/src/kratos-demo/cmd| ⇒ go build
kratos-demo/api
../api/client.go:15:68: undefined: DemoClient ../api/client.go:21:9: undefined: NewDemoClient