Go’s treatment of errors as valueshas served us well over the last decade. Although the standard library’s supportfor errors has been minimal—just the errors.New and fmt.Errorf functions,which produce errors that contain only a message—the built-in error interfaceallows Go programmers to add whatever information they desire. All it requiresis a type that implements an Errormethod: Error types like this one are ubiquitous, and the information they store varieswidely, from timestamps to filenames to server add…