2.2K Followers
·
Follow

Master and Understand Go Language Deeply and Build Go Programs from Scratch. 10+ Projects, 1000+ Exercises, and more.

Image for post
Image for post

You can get the course by clicking the link below:

Go: The Complete Bootcamp Course

Be sure checking out the free preview videos before buying it.

What does the course include?

Image for post
Image for post


Gotchas and tricks about defer.

Image for post
Image for post

This article is more about tricks rather than gotchas of defer.

Read the following posts from this series to discover more gotchas and tricks about defer:

If you don’t know how defer works please read this starter post first:

Image for post
Image for post

#1 — Calling recover outside of a deferred func

You should call recover() always inside a deferred func. When a panic occurs, calling recover() outside of defer will not catch it and the recover() will return nil.

Image for post
Image for post

Example

func do() {
recover()
panic("error")
}

Output

It couldn’t catch the panic.

panic: error
Image for post
Image for post
Will panic


Learn about everything I covered so far in the last year.

Image for post
Image for post

Hi!

In this article I’m going to cover what happened in 2017 and what will happen in 2018. And also, I’ve created a path for you to follow, so you can read my articles in order to digest them easily.

2017

After working days, nights, weeks, weekends, and months fulltime educating people about Go for 3 months, this happened:

  • I wrote 100,000 words in total (After edits: 20,000 words in total)
  • 2.500+ unique people followed me
  • 1.300+ people followed my blog
  • 500+ people subscribed to my e-mail list (Join here)
  • 800+ people followed me on Medium
  • 500+ people followed me on…

About

Inanc Gumus

Coder. Gopher. Maker. Stoic. Since 1993.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store