3 ms·
In search of better error handling for Go
- gostsamo 3y agoI'm not a go developer, but the post is accessible and gives a good overview of both go error handling and how it is done in other languages.
- mseepgood 3y ago> 1. It was solving the wrong problem. At the time the proposal was made (Go 1.12), the language didn’t have error wrapping. And this proposal is what motivated the Go team to add fmt.Errorf in the very next release. This is simply not true. Error values proposal: https://github.com/golang/go/issues/29934 https://github.com/golang/go/issues/29934 Jan 25, 2019, launch decision on May 6, 2019 Try proposal: https://github.com/golang/go/issues/32437 https://github.com/golang/go/issues/32437 Jun 5, 2019