Osvaldo Santana Neto

33%
Flag icon
Because deferred functions aren’t executed until the very end of a function’s execution, a defer statement in a loop deserves extra scrutiny. The code below could run out of file descriptors since no file will be closed until all files have been processed:
The Go Programming Language
Rate this book
Clear rating
Open Preview