Error Handling¶
π Articles¶
- Errors - Practical Go Lessons
- Error handling in Golang
- Error handling in Go
- Error Handling
- Error handling
- Why Go’s Error Handling is Awesome
- Golang Error Handling β Best Practice in 2020
- Handling Errors in Go
- Creating Custom Errors in Go
- Returning Errors
- Inspecting errors
- Handling Panics in Go
- Error handling best practice
- 3 simple ways to create an error
- Error handling in Go HTTP applicationse
- Input validation in GoLang
- Effective Error Handling in Golang
- Working with Errors in Go 1.13
- What’s the difference between errors.Wrapf(), errors.Errorf(), and fmt.Errorf()?
- How to Add Extra Information to Errors in Go
- Wrap and Unwrap errors in Go
- Handle errors in Go with errors.Is() and errors.As()
- Migrating pkg/errors to Go 1.13 errors
- Golang custom error types with stack trace
- Creating Custom Errors in Go
- Constant errors
- Inspecting errors
- Donβt just check errors, handle them gracefully
- Eliminate error handling by eliminating errors
- Stack traces and the errors package
- Error handling practices in Go
- Our favorite Go 1.13 features
- Stack traces and the errors package
- How to generate an error stack trace in Go
- gocon-spring-2016
- Top 6 Golang Logging Best Practices
- Go: Creating Custom Error Wrapper and Do Proper Error Equality Check
- Wrapping Errors in Go - How to Handle Nested Errors
- Panic and Recover
- Handling Panics in Go
- GOLANG TUTORIAL - PANIC AND RECOVER
- Some Panic/Recover Use Cases
- Panics, stack traces and how to recover [best practice]
- Errors and Error Wrapping in Go
- Testing and Validating Input in Go
- Testing errors in Go
- Comparing Go error values
- Structured errors in Go
- Wrapping errors in Go: A new approach
- ADVANCED GO ERROR HANDLING MADE SIMPLE
Videos¶
- GopherCon 2016: Dave Cheney - Dont Just Check Errors Handle Them Gracefully
- GopherCon 2019: Marwan Sulaiman - Handling Go Errors
π¦ Libraries¶
- mvmaasakkers/go-problemdetails - Problem json implementation (https://tools.ietf.org/html/rfc7807) package for go
- moogar0880/problems - RFC-7807 compliant library for describing HTTP errors
- mschneider82/problem - A go library that implements application/problem+json and application/problem+xml
- go-ozzo/ozzo-validation - An idiomatic Go (golang) validation package. Supports configurable and extensible validation rules (validators) using normal language constructs instead of error-prone struct tags.
- go-playground/validator - Go Struct and Field validation, including Cross Field, Cross Struct, Map, Slice and Array diving
- rotisserie/eris - Error handling library with readable stack traces and flexible formatting support
- pkg/errors - Simple error handling primitives
- cockroachdb/errors - Go error library with error portability over the network
- emperror/errors - Drop-in replacement for the standard library errors package and github.com/pkg/errors
- emperror/emperror - The Emperor takes care of all errors personally
- go-stack/stack - Package stack implements utilities to capture, manipulate, and format call stacks.
- juju/errors - Common juju errors and functions to annotate errors. Based on juju/errgo
- asaskevich/govalidator - Package of validators and sanitizers for strings, numerics, slices and structs
- Southclaws/fault - Go errors but structured and composable. Fault provides an extensible yet ergonomic mechanism for wrapping errors.
- samber/oops - Error handling library with context, stack trace and source fragments