<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          Go語言愛好者周刊:第 112 期

          共 2948字,需瀏覽 6分鐘

           ·

          2021-09-13 20:13

          這里記錄每周值得分享的 Go 語言相關(guān)內(nèi)容,周日發(fā)布。

          本周刊開源(GitHub:polaris1119/golangweekly[1]),歡迎投稿,推薦或自薦文章/軟件/資源等,請提交 issue[2]

          鑒于一些人可能沒法堅持把英文文章看完,因此,周刊中會盡可能推薦優(yōu)質(zhì)的中文文章。優(yōu)秀的英文文章,我們的 GCTT 組織會進行翻譯。

          由于微信公眾號不支持外鏈,文章大量鏈接可通過文末「閱讀原文」查看。

          題圖:現(xiàn)代加密工具

          刊首語

          上期的題目竟然只有 48% 的人做對。這里簡單解釋下。

          以下代碼輸出什么?

          package main

          import (
           "fmt"
          )

          func main() {
           num := 65
           str := string(num)
           fmt.Printf("%v, %T\n", str, str)
          }

          A:65, string;B:A, string;C:65, int;D:報錯

          正確答案:B。

          不過,如果你使用 go vet 檢查,會提示:conversion from int to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)

          也就是說,如果要將數(shù)字 65 轉(zhuǎn)為字符串,不能使用 string(num),如果使用這種方式轉(zhuǎn),得到的是一個 rune 的字符串表示,因為字面 A 的 ASCII 碼是 65,因此這里輸出結(jié)果是 A,string。

          本次不出新題目了!

          資訊

          1、Go 官網(wǎng)要變天。。。

          官網(wǎng)最近一直在變。

          2、Go1.17.1 發(fā)布

          小版本發(fā)布,修復(fù)安全問題。

          3、clash 1.7 發(fā)布[3]

          Go 中基于規(guī)則的隧道。

          文章

          1、Go Module 教程第 4 部分:鏡像、校驗和以及 Athens

          Go Module 系列教程的第 4 部分,Go Module 教程第 5 部分:Vendoring

          2、Go 實現(xiàn) Photoshop 的功能。。。

          實現(xiàn)了很多 Photoshop 的功能。

          3、Go: Finalizers 怎么使用?

          Go runtime 提供了一種允許開發(fā)者將一個函數(shù)與一個變量綁定的方法 runtime.SetFinalizer,被綁定的變量從它無法被訪問時就被垃圾回收器視為待回收狀態(tài)。

          4、看看國外的Gopher培訓(xùn)教程是怎樣的?

          一個 Go 培訓(xùn)的課程資料倉庫 gotraining。

          5、Go1.17 新特性:testing 包的相關(guān)變化

          今天介紹下 Go1.17 中的特性:testing 包的一些變化。

          6、Go1.17 新特性:go get 變了

          為什么把 Go 的一些小變化單獨寫文章,而不是一篇文章介紹所有的變化?主要是想讓大家對某一個特性有更深的記憶。

          7、在 Go 代碼中如何綁定 Host?

          有些場景會用到。

          8、瘋了吧!這幫人居然用 Go 寫“前端”?

          無一例外,談到前后端分離“必定”是 RESTful API,算是定式了。

          開源項目

          1、go-pst[4]

          一個讀寫 PST 文件的庫。

          2、gorm-sqlchaos[5]

          GORM SQLChaos 在程序運行時基于 gorm 對 DML 進行操作。

          3、bun[6]

          用于 PostgreSQL、MySQL 和 SQLite 的簡單且性能良好的數(shù)據(jù)庫客戶端。

          4、krok[7]

          支持 GitHub、GitLab、Bitbucket 等的 Webhook 管理服務(wù)。

          5、pgx[8]

          使用 sqlc/pgx 操作 Postgres 數(shù)據(jù)庫。

          6、go-mutesting[9]

          Go 變異測試(Mutation testing)框架。

          資源&&工具

          1、age[10]

          一個簡單、現(xiàn)代且安全的加密工具(和 Go 庫),具有小的顯式密鑰、無配置選項和 UNIX 風(fēng)格的可組合性。

          2、cli[11]

          通過運行一個 CLI 命令,創(chuàng)建一個具有后端、前端和部署自動化的項目。

          3、slo-tracker[12]

          跟蹤 SLA、SLO 和錯誤預(yù)算的工具。

          4、kubernetes-best-practices[13]

          Kubernetes 最佳實踐。

          5、changie[14]

          自動從 commit log 提取用于發(fā)布的更新日志工具。

          訂閱

          這個周刊每周日發(fā)布,同步更新在Go語言中文網(wǎng)[15]微信公眾號[16]

          微信搜索"Go語言中文網(wǎng)"或者掃描二維碼,即可訂閱。

          wechat

          往期推薦參考資料

          [1]

          polaris1119/golangweekly: https://github.com/polaris1119/golangweekly

          [2]

          提交 issue: https://github.com/polaris1119/golangweekly/issues

          [3]

          clash 1.7 發(fā)布: https://github.com/Dreamacro/clash

          [4]

          go-pst: https://github.com/mooijtech/go-pst

          [5]

          gorm-sqlchaos: https://github.com/u2386/gorm-sqlchaos

          [6]

          bun: https://github.com/uptrace/bun

          [7]

          krok: https://github.com/krok-o/krok

          [8]

          pgx: https://brandur.org/sqlc

          [9]

          go-mutesting: https://github.com/zimmski/go-mutesting

          [10]

          age: https://github.com/FiloSottile/age

          [11]

          cli: https://github.com/create-go-app/cli

          [12]

          slo-tracker: https://github.com/roshan8/slo-tracker

          [13]

          kubernetes-best-practices: https://github.com/diegolnasc/kubernetes-best-practices

          [14]

          changie: https://github.com/miniscruff/changie

          [15]

          Go語言中文網(wǎng): https://studygolang.com/go/weekly

          [16]

          微信公眾號: https://weixin.sogou.com/weixin?query=Go%E8%AF%AD%E8%A8%80%E4%B8%AD%E6%96%87%E7%BD%91


          瀏覽 87
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  日逼五月天 | 淫色娱乐,成人综合大全 | 7777奇米影视 | 中文无码视频在线 | 成人在线小视频 |