Goで型によるドメイン定義をするときの覚え書き
This content is a draft and will not be included in production builds.
Goでコードを書くときの前提を揃えておきたい
- ポインタ値はnilにならない(
[]*Tのとき途中にnilが入るとは思わないだろう) - 例外のときはコメント等で言及する
(T, error)でエラーの場合 T の値は無効- godoc
This content is a draft and will not be included in production builds.
Goでコードを書くときの前提を揃えておきたい
[]*T のとき途中にnilが入るとは思わないだろう)(T, error) でエラーの場合 T の値は無効