2024-08-02

Golang

  • defer: keyword defers the execution of the statement until the surrounding function returns, these statements are evaluated immediately but not executed until the surrounding function returns.

multiple defer statements are executed in stack wise, the last defer statement is executed first