~/talk

Go 2 error values today

Talkat dotGo 2019 · on Monday, 2019-03-25· [go]
slides:none on file

Proposal entering Go 1.13 adds concrete APIs and an implementation in the source tree: errors.Is walks wrapped errors and matches sentinel or dynamic predicates, Unwrap exposes the immediate cause, FormatError plus a single-frame model provides structured, localizable printing, and x/errors gives a backport and adapters for earlier releases. Migration notes cover automatic formatting heuristics for fmt.Errorf, a new %w verb to record wrapped errors, some runtime overhead for frames, and examples showing clearer checks and cleaner core-library code.

AI-written summary · about

  1. 0:00Start
  2. 2:43Custom error type
  3. 5:41Error inspection: Wrapper
  4. 9:46Normal versus Detail
  5. 10:23Error printing: Formatter and Printer
  6. 11:45Error Printing: Example
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.