Boldly Go
Blog YouTube Hire Me Contact Daily Email
Boldly Go
Blog YouTube Hire Me Contact Daily Email
Go Language Spec

2 min read


Defer statements

We’re at the last item in the “Statements” section of the spec, before we move on to built-in functions. And naturally, the last one is… the defer statement~ Defer statements A “defer” statement invokes a function whose execution is deferred to the moment the surrounding function returns, either because the surrounding function executed a return statement, reached the end of its function body, or because the corresponding goroutine is panicking.

My Content

  • Boldly Go: Daily
  • YouTube

My Services

  • Dev Subscription
  • Private Mentoring

About me

  • Contact Me
  • Privacy Policy

Subscribe to Boldly Go: Daily

Daily suggestions to improve your control of the Go language. I will respect your inbox, and honor my privacy policy.

Not convinced? Browse the archive.

© 2026 Jonathan Hall. All rights reserved.