package main
type gopher struct{}
func (g *gopher) selfRecover() (r bool) {
if b, ok := recover().(*gopher); ok {
r = g == b
}
return
}
func main() {
var g gopher
defer g.selfRecover()
panic(&g)
}
marcin-janas Goto Github PK
Name: Marcin Janas
Type: User
Company: @letsgodevops
Bio: Gopher all the time and sometimes a DevOps Consultant