|
| 1 | +# Go语言爱好者周刊:第 145 期 |
| 2 | + |
| 3 | +这里记录每周值得分享的 Go 语言相关内容,周日发布。本周刊开源(GitHub:[polaris1119/golangweekly](https://github.com/polaris1119/golangweekly)),欢迎投稿,推荐或自荐文章/软件/资源等,请[提交 issue](https://github.com/polaris1119/golangweekly/issues) 。鉴于一些人可能没法坚持把英文文章看完,因此,周刊中会尽可能推荐优质的中文文章。优秀的英文文章,我们的 GCTT 组织会进行翻译。 |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | +题图:箭头函数,看会不会采纳 |
| 8 | + |
| 9 | +## 刊首语 |
| 10 | + |
| 11 | +上期的题目比较简单,主要注意 `ints := make([]int, 1)` 创建的是一个长度为 1 的 slice,第一个元素是 int 的默认值。 |
| 12 | + |
| 13 | +看本期的题目。以下代码输出什么? |
| 14 | + |
| 15 | +```go |
| 16 | +package main |
| 17 | + |
| 18 | +import "fmt" |
| 19 | + |
| 20 | +func main() { |
| 21 | + type pos [2]int |
| 22 | + a := pos{4, 5} |
| 23 | + b := pos{4, 5} |
| 24 | + fmt.Println(a == b) |
| 25 | +} |
| 26 | +``` |
| 27 | + |
| 28 | +A:true;B:false;C:编译错误 |
| 29 | + |
| 30 | +## 资讯 |
| 31 | + |
| 32 | +1、[roaring 1.1 发布](https://github.com/RoaringBitmap/roaring) |
| 33 | + |
| 34 | +位图数据结构的 Go 实现。 |
| 35 | + |
| 36 | +2、[cli 2.7 发布](https://github.com/urfave/cli) |
| 37 | + |
| 38 | +一个快速构建 Go CLI 应用程序的库 |
| 39 | + |
| 40 | +3、[ffuf 1.5.0 发布](https://github.com/ffuf/ffuf) |
| 41 | + |
| 42 | +快速的网络模拟器。 |
| 43 | + |
| 44 | +## 文章 |
| 45 | + |
| 46 | +1、[go test 如何禁用缓存?教你3种找答案的方法](https://mp.weixin.qq.com/s/RY6o9ae9L8JEXsBVbtxeug) |
| 47 | + |
| 48 | +本文介绍几种方法,对你解决其他问题可能也会有帮助。 |
| 49 | + |
| 50 | +2、[Go:关键字与预定义标识符](https://mp.weixin.qq.com/s/tr6JwRV93IJtSXdRB6xAOQ) |
| 51 | + |
| 52 | +语法是一门编程语言的基础,而关键字又是语法的基础,我们通过这些关键字构建出一个个应用程序。 |
| 53 | + |
| 54 | +3、[详解 gRPC 客户端长连接机制实现](https://mp.weixin.qq.com/s/LBqsUyC3N-IgxSLUq6-mbg) |
| 55 | + |
| 56 | +这篇文章就来分析下如何实现这样的客户端保活(keepalive)逻辑。 |
| 57 | + |
| 58 | +4、[腾讯妹子图解Golang内存分配和垃圾回收](https://mp.weixin.qq.com/s/iAy9ReQhnmCYUFvwYroGPA) |
| 59 | + |
| 60 | +从内存分配到垃圾回收。 |
| 61 | + |
| 62 | +5、[golang源码分析:断路器 sony/gobreaker](https://mp.weixin.qq.com/s/FrT9sfMdYC41UDjRCKV77g) |
| 63 | + |
| 64 | +本文从源码级别分析一款断路器。 |
| 65 | + |
| 66 | +6、[哇,超详细解析 Go 语言 Context(附图)](https://mp.weixin.qq.com/s/V3q7MFCJ8etA3jGa6gH2yw) |
| 67 | + |
| 68 | +今天分享一篇从源码的角度详细分析 Context 包的文章。 |
| 69 | + |
| 70 | +## 开源项目 |
| 71 | + |
| 72 | +1、[wazero](https://github.com/tetratelabs/wazero) |
| 73 | + |
| 74 | +零依赖的 WebAssembly 运行时。 |
| 75 | + |
| 76 | +2、[cardrank](https://github.com/cardrank/cardrank) |
| 77 | + |
| 78 | +处理扑克牌的库。 |
| 79 | + |
| 80 | +3、[test](https://github.com/shoenig/test) |
| 81 | + |
| 82 | +基于泛型的测试库。 |
| 83 | + |
| 84 | +4、[broker](https://github.com/go-god/broker) |
| 85 | + |
| 86 | +broker 接口,支持 kafka、redis 等。作者自荐。 |
| 87 | + |
| 88 | +## 资源&&工具 |
| 89 | + |
| 90 | +1、[sneller](https://github.com/SnellerInc/sneller) |
| 91 | + |
| 92 | +用于 JSON 的矢量化 SQL 引擎。 |
| 93 | + |
| 94 | +2、[rrip](https://github.com/mahesh-hegde/rrip) |
| 95 | + |
| 96 | +Reddit 图片批量下载工具。 |
| 97 | + |
| 98 | +3、[Go 播客第 230 期](https://changelog.com/gotime/230) |
| 99 | + |
| 100 | +重访 Caddy Server。 |
| 101 | + |
| 102 | +4、[openmock](https://github.com/checkr/openmock) |
| 103 | + |
| 104 | +支持多种服务 mock 的工具。 |
| 105 | + |
| 106 | +5、[Go 教程](https://www.karanpratapsingh.com/courses/go) |
| 107 | + |
| 108 | +免费在线 Go 教程。 |
| 109 | + |
| 110 | +6、[reviewdog](https://github.com/reviewdog/reviewdog) |
| 111 | + |
| 112 | +与任何代码分析工具都可集成的自动代码 Review 工具,不受编程语言限制。 |
| 113 | + |
| 114 | +7、[Go 播客第 229 期](https://changelog.com/gotime/229) |
| 115 | + |
| 116 | +当 Go 项目变得庞大和混乱时该怎么做。 |
| 117 | + |
| 118 | +## 订阅 |
| 119 | + |
| 120 | +这个周刊每周日发布,同步更新在[Go语言中文网](https://studygolang.com/go/weekly)和[微信公众号](https://weixin.sogou.com/weixin?query=Go%E8%AF%AD%E8%A8%80%E4%B8%AD%E6%96%87%E7%BD%91)。 |
| 121 | + |
| 122 | +微信搜索"Go语言中文网"或者扫描二维码,即可订阅。 |
| 123 | + |
| 124 | + |
0 commit comments