Package stack provides a very small and clean API for using the built-in panic and recover functions to abort and resume execution of a goroutine.
Get the package using the go tool:
$ go get -u github.com/256dpi/stack
The MIT License (MIT)
Copyright (c) 2016 Joël Gähwiler