当前位置:网站首页>[resolved] -go_ out: protoc-gen-go: Plugin failed with status code 1.

[resolved] -go_ out: protoc-gen-go: Plugin failed with status code 1.

2022-06-22 20:27:00 Viva Python

solve :--go_out: protoc-gen-go: Plugin failed with status code 1.

Method 1
1. option Parameters

​ stay .proto Add... To the file

option go_package = "./;ProtoModel";  //  Corresponding : Generation location ; Package name 
2. go install

​ download Go Linguistic protoc plug-in unit

go install github.com/golang/protobuf/[email protected]

​ Will be in <GOPATH>/bin Lower generation protoc-gen-go.exe file , This is also the reason why the above exception is thrown .

[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-FRcqoqJV-1655796842062)(C:\Users\Jackson\AppData\Roaming\Typora\typora-user-images\image-20220621153128445.png)]

3. success !

[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-zlR7lmmG-1655796842064)(C:\Users\Jackson\AppData\Roaming\Typora\typora-user-images\image-20220621153320526.png)]

原网站

版权声明
本文为[Viva Python]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206221849580060.html