DEV Community

Mark
Mark

Posted on

Recovergoroutine prevents panic from occurring within goroutines

https://github.com/Buzzvil/recovergoroutine

If a panic occurs during server operation, the server is down. While servers typically employ a Recover middleware to address this, if a panic occurs within a goroutine, a middleware does not cover it as it executes in a separate context. I believe that such mistakes can easily be made by humans, so I devised a linter that checks whether the Recover process has been implemented in a goroutine without fail, and I created the linter.

Top comments (0)