DEV Community

Aleksei Aleinikov
Aleksei Aleinikov

Posted on

πŸ™ˆ Fifteen if err != nil in a Row? Cut the Noise.

Go’s clarity is great β€” until your business logic drowns in endless error checks.

I built a tiny lib called try to flip the script:

  • try.Val β†’ use values directly, errors become panics
  • try.Catch β†’ one defer to collect them as plain errors
  • try.Async β†’ safe goroutines without β€œwho crashed the process?”

πŸ’‘ Use cases:

  • CSV import in 2 lines
  • DB query without boilerplate
  • Concurrent consumers with built-in safety

πŸ‘‰ Full article: Cut the Noise: Streamlined Go Error Handling with try (2025 Edition)
https://blog.devgenius.io/cut-the-noise-streamlined-go-error-handling-with-try-2025-edition-c381c9277749

Top comments (0)