Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.6k views
in Technique[技术] by (71.8m points)

关于 proto service 生成 pb.go 文件的一个问题

image.png

没有生成

image.png

我输入的命令是

protoc --go_out=. filscanproto.proto


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

命令错了,你用的那个只是protobuf平常序列化数据用的 grpc 用下面这个

protoc --go_out=plugins=grpc:. helloworld.proto

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...