basebank / gophers-code-reading-party

Gophers Code Reading Party records
18 stars 1 forks source link

20211111 Gophers Code Reading Party #15

Closed budougumi0617 closed 1 year ago

budougumi0617 commented 2 years ago

15:00~16:00@ Zoom, BASE BANK, Inc.

参加者

@budougumi0617 @daisuzu @glassmonkey @hgsgtk

お題

ネタ

ネタがなかったら proposal: review meeting minutes をみてみよう!
https://github.com/golang/go/issues/33502

budougumi0617 commented 2 years ago

daisuzuさんの新作だ!(この前おしえもらったやつだ!

https://daisuzu.hatenablog.com/entry/2021/10/31/225356

budougumi0617 commented 2 years ago

もうこんな時期 https://qiita.com/advent-calendar/2021/go

budougumi0617 commented 2 years ago

https://twitter.com/dgryski/status/1455653727881375749?s=20

budougumi0617 commented 2 years ago
hgsgtk commented 2 years ago

https://twitter.com/jmuk/status/1456134404871364608?s=21

Builder PatternとFunctional options patternについてGoogleのAPIクライアントでの実装は背景について興味深め

budougumi0617 commented 2 years ago
budougumi0617 commented 2 years ago

https://pkg.go.dev/net/netip@master

budougumi0617 commented 2 years ago

https://golangweekly.com/issues/386

4 Great Talks from Google's Go Day 2021 — It took place just yesterday but you can register to watch the talks (which are all reasonably short and ideal for lunch breaks!) on demand now.. or you can use our links direct to the YouTube versions ;-) https://opensourcelive.withgoogle.com/events/go-day-2021

Google Open Source Live

budougumi0617 commented 2 years ago

https://twitter.com/golang/status/1456314310330880004 https://groups.google.com/g/golang-announce/c/0fM21h43arc/m/a2Hu_dWRAAAJ

We have just released Go versions 1.17.3 and 1.16.10, minor point releases.

These minor releases include two security fixes following the security policy:

archive/zip: don't panic on (*Reader).Open

Reader.Open (the API implementing io/fs.FS introduced in Go 1.16) can be made to panic by an attacker providing either a crafted ZIP archive containing completely invalid names or an empty filename argument.

Thank you to Colin Arnott, SiteHost and Noah Santschi-Cooney, Sourcegraph Code Intelligence Team for reporting this issue.

This is CVE-2021-41772 and Go issue golang.org/issue/48085.

debug/macho: invalid dynamic symbol table command can cause panic

Malformed binaries parsed using Open or OpenFat can cause a panic when calling ImportedSymbols, due to an out-of-bounds slice operation.

Thanks to Burak Çarıkçı - Yunus Yıldırım (CT-Zer0 Crypttech) for reporting this issue

This is CVE-2021-41771 and Go issue golang.org/issue/48990.

View the release notes for more information:

    https://golang.org/doc/devel/release.html#go1.17.minor
hgsgtk commented 2 years ago

https://twitter.com/dice_zu/status/1457013337028370440?s=21

database/sqlのコードを真面目に読んでようやくCommit時にErrTxDoneが返ってくる理由がわかった

hgsgtk commented 2 years ago

Go1.18 thread

https://twitter.com/mvdan_/status/1456947756925399040?s=21

budougumi0617 commented 2 years ago

でたー!(ソフトウェアデザインの連載記事がベースのはず)

エキスパートたちのGo言語 一流のコードから応用力を学ぶ (Software Design plus) https://www.amazon.co.jp/gp/product/4297125196

hgsgtk commented 2 years ago

https://go.dev/blog/12years

12 years

hgsgtk commented 2 years ago

自分の書いた英語が自然な文意か確かめていたときのひととき

image

budougumi0617 commented 2 years ago

前のMTGが押していてちょっと遅くなります 🙇

budougumi0617 commented 2 years ago

これでお願いします!!! https://zoom.us/j/96048293146?pwd=blA2YW9TQ29TMm9JU1lUWDQ5MjBwdz09

budougumi0617 commented 2 years ago

AWS SDKをv1からv2にもっていくぞ作戦を実行中

https://twitter.com/dice_zu/status/1457013337028370440 https://daisuzu.hatenablog.com/entry/2021/10/31/225356

DynamoDBも使っているのでトランザクション制御したい。AWS SDK V2にするとcontextでリクエストのキャンセルを伝えられうようになる。

daisuzu commented 2 years ago

https://cs.opensource.google/go/go/+/refs/tags/go1.17.3:src/database/sql/sql.go;l=1837-1866;drc=refs%2Ftags%2Fgo1.17.3

budougumi0617 commented 2 years ago

contextがちゃんとDone状態になる処理(ex: httpリクエスト)の中ならば最悪Rollbackわすれていてもダイジョブ(Txがcontextの状態を最後に見てくれる。

budougumi0617 commented 2 years ago

CompareAndSwapInt32 事例

// Commit commits the transaction.
func (tx *Tx) Commit() error {
    // Check context first to avoid transaction leak.
    // If put it behind tx.done CompareAndSwap statement, we can't ensure
    // the consistency between tx.done and the real COMMIT operation.
    select {
    default:
    case <-tx.ctx.Done():
        if atomic.LoadInt32(&tx.done) == 1 {
            return ErrTxDone
        }
        return tx.ctx.Err()
    }
    if !atomic.CompareAndSwapInt32(&tx.done, 0, 1) {
        return ErrTxDone
    }
}
budougumi0617 commented 2 years ago

Symbol 検索できるようになったよ! https://go.dev/blog/pkgsite-search-redesign

budougumi0617 commented 2 years ago

Go1.18スレッド、絶賛更新中だった。ありがたし…

https://twitter.com/mvdan_/status/1456947756925399040?s=21

budougumi0617 commented 2 years ago
budougumi0617 commented 2 years ago

よさそうだけどちゃんと読んでないやつ

daisuzu commented 2 years ago

https://levelup.gitconnected.com/practical-solid-in-golang-open-closed-principle-1dd361565452 https://levelup.gitconnected.com/practical-solid-in-golang-liskov-substitution-principle-e0d2eb9dd39

budougumi0617 commented 2 years ago

Effective Goって本が出る https://www.manning.com/books/effective-go

Grafanaでk6作ったりしている人?が書くみたい https://www.linkedin.com/in/inancgumus/?originalSubdomain=uk

budougumi0617 commented 2 years ago

次はコードを読むぞ…!