Glossary: Go Beyond the Basics
defer
Also written: deferred
A keyword that schedules a function call to run when the surrounding function returns, however it returns. It is used for `cancel()`, `mu.Unlock()` and `ticker.Stop()`.
Glossary: Go Beyond the Basics
Also written: deferred
A keyword that schedules a function call to run when the surrounding function returns, however it returns. It is used for `cancel()`, `mu.Unlock()` and `ticker.Stop()`.