DRY & 型安全にテスト用structを初期化しよう

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →

DRY & 型安全にテスト用structを初期化しよう

Go Conference 2020 Autumnの登壇資料です。
YoutubeのURLはhttps://www.youtube.com/watch?v=DkWUh4oR0acになります。

Kanji Yomoda

October 10, 2020

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

25 slides
  1. Pros - 値の設定・上書きが柔軟 - 型の恩恵が得られる Cons - go generate or

    fixtoryコマンドの実行が必要 (genericsが入れば不要になる予定) - ゼロ値での上書きが面倒 - 上書きし過ぎると、可読性が下がる fixtroy
  2. まとめ ライブラリ 可読性 柔軟性 効率性 testfixtures ◎ △ △ factory-go

    △ ◎ △ fixtory ◯ ◯ ◎ ユースケースに応じたライブラリ選択

More Decks by Kanji Yomoda

Other Decks in Programming