Goのテストについていくつかまとめを書いていた。 Goのtestを理解する in 2018 #go Goのtestを理解する in 2019 触れるのを忘れていたhttptestパッケージについてまとめる。 https://golang.org/pkg/net/http/httptest/ TL;DR net/http/httptestパッケージ https://golang.org/pkg/net/http/httptest/ net/http/httptestパッケージはサーバ/クライアント両方のHTTP周りのテストで使う サーバのHTTPハンドラーのテストを書くとき https://golang.org/pkg/net/http/httptest/#NewRequest https://golang.org/pkg/net/http/httptest/#NewRecorder ダミー
![Goのtestを理解する - httptestサブパッケージ編 - My External Storage](https://cdn-ak-scissors.b.st-hatena.com/image/square/f3ca5145f819bb37539bafba90f1c2353dbe1f00/height=288;version=1;width=512/https%3A%2F%2Fbudougumi0617.github.io%2Flogos%2FGo-Logo_Aqua.png)