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

題圖:愛上 Code Review
刊首語
接著上期周刊,看大家是否掌握了該知識點。如果上期題目做錯了,建議先看看 《這道題竟然只有 12% 的人答對。。。》 。
以下代碼輸出什么?如果你不確定,建議你查閱相關(guān)文檔再作答。
package?main
import(
?"fmt"
?"encoding/json"
?"context"
)
func?main()?{
?data,?_?:=?json.Marshal(context.WithValue(context.Background(),?"a",?"b"))
?fmt.Println(string(data))
}資訊
1、vscode-go 計劃將 gopls 作為默認(rèn)語言服務(wù)器[3]
目前默認(rèn)是不啟用 gopls 的。
2、go module 即將成為你的唯一選擇[4]
別掙扎了,趕緊換成 module 吧。
3、webrtc v3.0.0 發(fā)布[5]
著名 Go WebRTC 框架。
4、GoLand IDE 2021.1 raodmap[6]
看看會加哪些新功能。
文章
一個可以替代 errors 和 pkg/errors 的庫。
Go 格式化 API — CockroachDB errors 庫(第2篇) Go error 打印災(zāi)難 — CockroachDB errors 庫(第3篇) 除了 fmt.Errorf() 之外—Go 中的日常錯誤對象:CockroachDB errors 庫(第4篇)
這是本周刊上期(74 期)的問題解析。
先說清楚,在 go 中沒有引用變量,所以更不存在什么引用傳值了。
4、又是 Python,又是 Go 和 Rust,你覺得這個招聘到底是要什么人才?
掌握多門語言是趨勢?
一個服務(wù)的監(jiān)控從整體考慮,要達到哪些才能算是完善的?我想,如果沒有一個全局性的監(jiān)控思考,一個服務(wù)的監(jiān)控即使加的再多也是會有監(jiān)控盲區(qū)的。
6、圖解 Go pprof 收集數(shù)據(jù)的工作流
pprof 是用于分析諸如 CPU 或 內(nèi)存分配等 profile 數(shù)據(jù)的工具。分析程序的 profile 數(shù)據(jù)需要收集運行時的數(shù)據(jù)用來在之后統(tǒng)計和生成畫像。
7、2020 年字節(jié)跳動 Go 面試總結(jié)
雖然是 Go 面試,但完全是 Go 的內(nèi)容真不多。可見大家準(zhǔn)備時,一定不能只盯著 Go 語言本身。
8、Go 運行程序中的線程數(shù)[7]
可以控制線程數(shù)嗎?
9、grafana 的主體架構(gòu)是如何設(shè)計的?
這篇想解釋下它的主體架構(gòu)的設(shè)計思路,如果你對 grafana 有興趣,不妨讓這篇成為源碼閱讀入門讀物。
10、Golang最細節(jié)篇— struct{} 空結(jié)構(gòu)體究竟是啥?
基于 go1.13.3 linux/amd64 分析。
開源項目
1、owncast[8]
Go實現(xiàn)的自托管的實時流服務(wù)器。
2、go-containerregistry[9]
與鏡像倉庫互操作的 Go 包。
3、DocHub[10]
基于 Beego 開發(fā)的類似百度文庫站點。
4、trigger[11]
基于 Google 通用表達式語言(CEL)的決策和觸發(fā) Go 框架。
5、diff3[12]
diff3 文本合并算法的 Go 實現(xiàn)。
6、progress_bar[13]
進度條的 Go 實現(xiàn)。
7、redcon[14]
用于 Go 的 Redis 兼容服務(wù)器框架。
8、goatcounter[15]
一個開源 Web 分析平臺,可作為托管服務(wù)(非商業(yè)用途免費)或自托管應(yīng)用程序。
9、gobetween[16]
Сloud 時代的現(xiàn)代簡約負(fù)載均衡器。

10、clutch[17]
可擴展的基礎(chǔ)架構(gòu)管理平臺。
11、fusion[18]
用 Go 語言編寫的微型流處理庫。
12、low[19]
Golang 中的底層數(shù)據(jù)類型和 utils。
13、email-verifier[20]
作者自薦。一個高性能、多維度檢查的 email 地址校驗庫。
資源&&工具
1、油管視頻[21]
Go 機器學(xué)習(xí)實例解析。
2、一本有關(guān) Go 網(wǎng)絡(luò)編程的書要出版了[22]
no starch 出版社的《Network Programming with Go》將在明年 2 月與 gopher 見面。
3、brockly[23]
使用 brockly 以圖形化方式構(gòu)建一個 Go Web Server。
沒有答案,靠自己了。
5、油管視頻[24]
Go 1.16 文件嵌入教程。
6、GopherCon 2020 技術(shù)大會視頻全集[25]
相應(yīng)全套 PPT 可以關(guān)注該公眾號回復(fù)「gophercon2020」獲取。
7、MIT 課程《Distributed Systems 》中文版[26]
使用 Go 作為課程設(shè)計和示例編程語言。
8、油管視頻[27]
Go 1.14 增加的 goroutine 搶占調(diào)度背后的故事 by Austin Clements。
9、aquatone[28]
Aquatone 是用于對大量主機上的網(wǎng)站進行視覺檢查的工具,可以方便地快速獲得基于 HTTP 的攻擊面的概述。
10、cointop[29]
基于輕量級交互式終端的 UI 應(yīng)用程序,用于跟蹤加密貨幣。
11、cds[30]
基于 go-zero 構(gòu)建的 ClickHouse 的大數(shù)據(jù)數(shù)據(jù)同步、存儲、計算系統(tǒng)。
12、clash[31]
Go 中基于規(guī)則的隧道。
13、evans[32]
更具表現(xiàn)力的通用 gRPC 客戶端。

訂閱
這個周刊每周日發(fā)布,同步更新在Go語言中文網(wǎng)[33]和微信公眾號[34]。
微信搜索"Go語言中文網(wǎng)"或者掃描二維碼,即可訂閱。
上期推薦Go語言愛好者周刊:第 74 期 — 不仔細你就會答錯
參考資料
polaris1119/golangweekly: https://github.com/polaris1119/golangweekly
[2]提交 issue: https://github.com/polaris1119/golangweekly/issues
[3]vscode-go 計劃將 gopls 作為默認(rèn)語言服務(wù)器: https://github.com/golang/vscode-go/issues/1037
[4]go module 即將成為你的唯一選擇: https://utcc.utoronto.ca/~cks/space/blog/programming/GoModulesOnlyFuture
[5]webrtc v3.0.0 發(fā)布: https://github.com/pion/webrtc/wiki/[email protected]
[6]GoLand IDE 2021.1 raodmap: https://blog.jetbrains.com/go/2020/12/24/goland-2021-1-roadmap/
[7]Go 運行程序中的線程數(shù): https://colobu.com/2020/12/20/threads-in-go-runtime/
[8]owncast: https://github.com/owncast/owncast
[9]go-containerregistry: https://github.com/google/go-containerregistry
[10]DocHub: https://github.com/TruthHun/DocHub
[11]trigger: https://github.com/graphikDB/trigger
[12]diff3: https://github.com/nasdf/diff3
[13]progress_bar: https://github.com/ermanimer/progress_bar
[14]redcon: https://github.com/tidwall/redcon
[15]goatcounter: https://github.com/zgoat/goatcounter
[16]gobetween: https://github.com/yyyar/gobetween
[17]clutch: https://github.com/lyft/clutch
[18]fusion: https://github.com/spy16/fusion
[19]low: https://github.com/openacid/low
[20]email-verifier: https://github.com/aftership/email-verifier
[21]油管視頻: https://www.youtube.com/watch?v=vnA-aSoQSeE&t=359s
[22]一本有關(guān) Go 網(wǎng)絡(luò)編程的書要出版了: https://nostarch.com/networkprogrammingwithgo
[23]brockly: https://github.com/thestrukture/brockly
[24]油管視頻: https://www.youtube.com/watch?v=YoDGTwwQTso&feature=youtu.be
[25]GopherCon 2020 技術(shù)大會視頻全集: https://www.youtube.com/playlist?list=PL2ntRZ1ySWBfUint2hCE1JRxRWChloasB
[26]MIT 課程《Distributed Systems 》中文版: https://github.com/feixiao/Distributed-Systems
[27]油管視頻: https://www.youtube.com/watch?v=1I1WmeSjRSw
[28]aquatone: https://github.com/michenriksen/aquatone
[29]cointop: https://github.com/miguelmota/cointop
[30]cds: https://github.com/tal-tech/cds
[31]clash: https://github.com/Dreamacro/clash
[32]evans: https://github.com/ktr0731/evans
[33]Go語言中文網(wǎng): https://studygolang.com/go/weekly
[34]微信公眾號: https://weixin.sogou.com/weixin?query=Go%E8%AF%AD%E8%A8%80%E4%B8%AD%E6%96%87%E7%BD%91
