protoc-gen-go: error:bad Go source code was generated: 163:6: illegal UTF-8 encoding (and 2915 more errors)

protoc-gen-go: error:bad Go source code was generated: 163:6: illegal UTF-8 encoding (and 2915 more errors)
1 // Code generated by protoc-gen-go. DO NOT EDIT.

原因是proto 文件中含有中文

解决方法:

1 把所有中文去掉 

2 中文放在message 结构的 下面,但接口中不能喊中文注释、第一个message 上面也不能有中文

posted @ 2017-10-16 09:01  苍洱  阅读(1094)  评论(0编辑  收藏  举报