Panic and recover in Golang [Best Go examples 2020]
At run time, when a program panics, it immediately starts to unwind the call stack. Panics can also be initiated by user, by invoking inbuild panic() directly. Recover is a built-in function that regains control of a panicking goroutine. Recover is called inside a deferred functions.