[root@localhost protobuf]# pwd
/www/golang/protobuf
[root@localhost protobuf]# ls
product.proto
[root@localhost protobuf]# cat product.proto
syntax = "proto3";
package go.micro.service.product;
service Product {
rpc AddProduct(ProductInfo) returns (ResponseProduct) {}
}
message ProductInfo {
int64 id = 1;
string product_name = 2;
}
message ResponseProduct {
int64 product_id = 1;
}
[root@localhost protobuf]#
[root@localhost protobuf]# docker run --rm -v $(pwd):$(pwd) -w $(pwd) -e ICODE=xxxx cap1573/cap-protoc -I ./ --go_out=./ --micro_out=./ ./product.proto
Cap老师提醒您,请对照视频输入正确命令和参数
%!(EXTRA *exec.ExitError=exit status 1)[root@localhost protobuf]#
是linux cent7.9系统