protobuf新增
时间: 2023-08-21 10:07:23 浏览: 77
为了在Go语言中使用proto包下的函数,你需要导入 "google.golang.org/protobuf/proto" 包。其中,proto.HasExtension函数可以用来判断扩展字段是否已经被赋值,如果没有被赋值,则返回false,否则返回true。同样,proto.GetExtension函数可以用来获取指定的扩展字段的值。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [Protobuf 介绍与实战24:不更改原有proto文件的基础上,如何增加新的字段?类似于继承效果?extensions](https://blog.csdn.net/u011582922/article/details/122872785)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *3* [protobuf新增message报错:类型已存在](https://blog.csdn.net/wuxun1997/article/details/115526074)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文