The common contract for functions which return a value of the interface type error, is the caller should not presume anything about the state of the other values returned from that call without first checking the error.| Dave Cheney
This is a thought experiment about sentinel error values in Go.| Dave Cheney
A few months ago I gave a presentation on my philosophy for error handling. In the talk I introduced a small errors package designed to support the ideas presented in the talk.| Dave Cheney
This writeup is part of the prologue to a series of articles that talk about the “CockroachDB errors library”, which is really a general-purpose, open source replacement for Go’s standard errors package. So, what are we talking about here? The basic Go error API: errors are values The Go …| dr knz @ work
Go 1.13’s standard library has adopted Dave Cheney‘s main contribution to error handling from 2015: the idea that Go error objects are structured as linked lists. Alas, this adoption created a giant gap for Go developers: it has become difficult, almost impossible, to make printing error objects …| dr knz @ work