Go語言愛好者周刊:第 106 期 — 一道 LeetCode 題目
這里記錄每周值得分享的 Go 語言相關(guān)內(nèi)容,周日發(fā)布。
本周刊開源(GitHub:polaris1119/golangweekly[1]),歡迎投稿,推薦或自薦文章/軟件/資源等,請(qǐng)提交 issue[2] 。
鑒于一些人可能沒法堅(jiān)持把英文文章看完,因此,周刊中會(huì)盡可能推薦優(yōu)質(zhì)的中文文章。優(yōu)秀的英文文章,我們的 GCTT 組織會(huì)進(jìn)行翻譯。
由于微信公眾號(hào)不支持外鏈,文中大量鏈接可通過文末「閱讀原文」查看。

題圖:GoLand 2021.2 發(fā)布
刊首語
本期題目由網(wǎng)友「愛笑」投稿,以下代碼輸出什么,你知道為什么嗎?
package main
import (
"fmt"
)
func main() {
nums := []int{1, 2, 3, 4, 5, 6, 7}
k := 3
rotate(nums, k)
fmt.Println(nums)
}
func rotate(nums []int, k int) {
k = k % len(nums)
nums = append(nums[len(nums)-k:], nums[0:len(nums)-k]...)
}
資訊
1、todocheck 0.4.0 發(fā)布[3]
Go 用于帶注釋的 TODO 注釋的靜態(tài)代碼分析器。
2、重磅!GoLand 2021.2 發(fā)布了,支持 Go1.17
可以試用 30 天。
誰在招 Gopher
整理近期的 Go 職位。有招聘需求可以到「Go招聘」發(fā)布!
文章
1、Go開源項(xiàng)目推薦:500行代碼確認(rèn)請(qǐng)求時(shí)間花在哪
開源項(xiàng)目:https://github.com/davecheney/httpstat。
2、一道關(guān)于 len 函數(shù)的詭異 Go 面試題解析
Go語言愛好者周刊第 104 期題解。
在 Go 語言中,你可以用少量的代碼表達(dá)很多東西。您通常可以查看一小段代碼并清楚地了解此程序的功能。這在 Go 社區(qū)中被稱為地道的 Go 代碼。
4、Go 語言實(shí)現(xiàn)安全計(jì)數(shù)的若干種方法
本文是一篇如何用 goroutine-safe 的方式實(shí)現(xiàn)計(jì)數(shù)器的方法匯總。
泛型將在 1.18 發(fā)布。
開源項(xiàng)目
1、carbon[4]
一個(gè)輕量級(jí)、語義化、對(duì)開發(fā)者友好的 golang 時(shí)間處理庫,支持鏈?zhǔn)秸{(diào)用。

2、harmonica[5]
一個(gè)簡(jiǎn)單,高效的動(dòng)畫庫。
3、goqu[6]
一個(gè)富有表現(xiàn)力的 SQL Builder 和查詢庫。
4、health[7]
一個(gè)簡(jiǎn)單而靈活的健康檢查庫。
5、hdfs[8]
hdfs 的 Go 客戶端。
6、go-linq[9]
Go 中的.NET LINQ 功能。
7、goscript[10]
將 Go 作為 Rust 中的腳本語言。
8、kubernetes-testing-framework[11]
Go 集成測(cè)試框架,用于 Kong Kubernetes APIs 和控制器。
資源&&工具
1、concourse[12]
持續(xù)集成工具。

本書單翻譯自 https://github.com/dariubs/GoBooks,書單主要分為入門、高級(jí)、Web和其他在線資源的Go書籍和教程。
3、rediloper[13]
Go 實(shí)現(xiàn)的 protobuf 文件生成器。
4、gofu[14]
一個(gè)腳本語言工具包。
5、油管視頻[15]
用于生產(chǎn)的動(dòng)態(tài) Go 儀表盤。
6、powerproto[16]
一款多功能 proto 工具。
7、kubesurveyor[17]
Kubernetes 命名空間可視化工具。
8、naml[18]
將 Kubernetes YAML 替換為純 Go。
9、expr[19]
一個(gè)用 Go 編寫的基于堆棧的微小虛擬機(jī)。
10、karma[20]
Prometheus Alertmanager 的警報(bào)儀表板。
訂閱
這個(gè)周刊每周日發(fā)布,同步更新在Go語言中文網(wǎng)[21]和微信公眾號(hào)[22]。
微信搜索"Go語言中文網(wǎng)"或者掃描二維碼,即可訂閱。
往期推薦
參考資料
polaris1119/golangweekly: https://github.com/polaris1119/golangweekly
[2]提交 issue: https://github.com/polaris1119/golangweekly/issues
[3]todocheck 0.4.0 發(fā)布: https://github.com/preslavmihaylov/todocheck/tree/v0.4.0
[4]carbon: https://github.com/golang-module/carbon
[5]harmonica: https://github.com/charmbracelet/harmonica
[6]goqu: https://github.com/doug-martin/goqu
[7]health: https://github.com/alexliesenfeld/health
[8]hdfs: https://github.com/colinmarc/hdfs
[9]go-linq: https://github.com/ahmetb/go-linq
[10]goscript: https://github.com/oxfeeefeee/goscript
[11]kubernetes-testing-framework: https://github.com/Kong/kubernetes-testing-framework
[12]concourse: https://github.com/concourse/concourse
[13]rediloper: https://github.com/p1gd0g/rediloper
[14]gofu: https://github.com/codr7/gofu
[15]油管視頻: https://www.youtube.com/watch?v=Uk1hscXhlY0
[16]powerproto: https://github.com/storyicon/powerproto
[17]kubesurveyor: https://github.com/viralpoetry/kubesurveyor
[18]naml: https://github.com/kris-nova/naml
[19]expr: https://github.com/regeda/expr
[20]karma: https://github.com/prymitive/karma
[21]Go語言中文網(wǎng): https://studygolang.com/go/weekly
[22]微信公眾號(hào): https://weixin.sogou.com/weixin?query=Go%E8%AF%AD%E8%A8%80%E4%B8%AD%E6%96%87%E7%BD%91
