Preslav Rachev
The Go Journey
Published in
1 min readDec 14, 2019

--

I actually agree with this. There have been a few occasions in my work, where I nudged people to write code that fails right away, rather than obfuscate the flow with passing errors backs, only to panic in the main goroutine.

In the Go community, there is some kind of paranoia around panicking, as if it’s the worst thing that can happen to your application. In fact, it often is the better option. Think about Go programs as CLI applications Would you rather crash right away and let the user react, or hang, trying to recover? The same applies to applications running as services. Modern tooling makes it easy to restart a crashing service within seconds.

When necessary, panic without worry.

--

--

Preslav Rachev
The Go Journey

I am a genuinely curious individual on a mission to help digital creators and startups realize their vision. Follow my journey: https://preslav.me