Əsas məzmuna keç
0

Bu dərs hələlik ingiliscədir.

Clean up, no matter what

Open a file, lock a mutex, start a timer: each needs a matching cleanup. defer lets you write the cleanup right next to the setup, and Go runs it when the function returns, whichever path it takes.