protoc-gen-go: unable to determine Go import path for "xxx.proto"
Go for to quot path unable import xxx
2023-09-11 14:19:00 时间
问题
$ protoc --go_out=. *.proto
protoc-gen-go: unable to determine Go import path for "xxx.proto"
Please specify either:
• a "go_package" option in the .proto source file, or
• a "M" argument on the command line.
See https://developers.google.com/protocol-buffers/docs/reference/go-generated#package for more information.
--go_out: protoc-gen-go: Plugin failed with status code 1.
解决方法
提示以上错误可以通过将protoc-gen-go
版本降至v1.3.2及以下解决:
go get -u github.com/golang/protobuf/protoc-gen-go@v1.3.2
相关文章
- Error This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. T
- 【Go命令教程】3. go install
- 【Go入门教程8】interface(interface类型、interface值、空interface{}、嵌入interface、反射)
- [Go] Error
- 【Go语言】【12】GO语言的结构体
- go语言之PLAN9汇编
- go gin框架:QueryArray接收一组请求
- Go Gin框架使用模板:传入参数(页面显示参数)
- go使用for...range遍历数组
- [Go] 获得一个整数范围区间的随机数 (golang)
- [Go] go-nsq 使用指南
- [Go] Viper 加载项目配置,go build 打包配置文件进二进制
- 我的Go+语言初体验——go【Format】goplus
- 【Go】go实现 — 链表
- Go语言自学系列 | go语言切片的遍历
- 387集Go语言核心编程培训视频教材整理 | 运算符(四)
- MacBook2016在SSD上安装Win To Go(成功经验分享)
- Go go.mod入门
- go中gin框架+realize实现边写代码边编译,热更新,方便边改边看效果
- go语言time库
- go语言第二章循环结构(for循环)
- Go 数据类型:数据类型有哪些?
- 源码安装 go-filecoin 0.5.8
- Mac上go环境变量配置