02 2022 档案

摘要:多个defer的执行顺序为“后进先出”; defer、return、返回值三者的执行逻辑应该是: (1) return最先执行,return负责将结果写入返回值中; (2) 接着defer开始执行一些收尾工作; (3) 最后函数携带当前返回值退出。 1. 不带命名返回值的函数 如果函数的返回值是无名 阅读全文
posted @ 2022-02-13 10:52 拾月凄辰 阅读(674) 评论(0) 推荐(0) 编辑
摘要:问题 $ 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 阅读全文
posted @ 2022-02-04 12:01 拾月凄辰 阅读(1418) 评论(1) 推荐(1) 编辑

点击右上角即可分享
微信分享提示
主题色彩