The “defer” is a keyword that provides a block of code that can be executed while the execution is leaving the current scope.