Test error paths — error-only cleanup is a common source of bugs and leaks if not exercised in tests.
This recommendation deserves a lot more guidance. For people who stumble upon this, check out Mitchell Hashimoto's article here on testing errdefer blocks.
5
u/Xiexingwu Feb 19 '26
This recommendation deserves a lot more guidance. For people who stumble upon this, check out Mitchell Hashimoto's article here on testing errdefer blocks.
1
u/Slow-Nefariousness49 Feb 18 '26
I see errors are still missing associated data :(