Tech article
defer in Loops: The Resource Leak Go Still Lets You Write
defer runs at function return, not at the end of a loop iteration. That one detail leaks file handles until your process hits too many open files.
Dev.to | Jun 13, 2026 | Gabriel Anhaia