~/talk

The Things I Find Myself Repeating About Go

Talkat GopherCon Europe 2025 · 2025-06-16..06-19· [go]
slides:none on file

Advice centers on concrete rules: prefer main.run pattern so the run function returns an error and becomes testable; initialize values once by default and use a keep to the left guard‑clause style to remove else blocks; push conditionals into named helpers (e.g. environment-based newThing, pointer helpers like Addr, JSON responder helpers) and prefer switch over nested if/else; wrap context.Canceled, status checks (use >399 not >=400) and deferred test evaluation to avoid consuming response bodies so tests remain reliable.

AI-written summary · about

  1. 0:00Introduction
  2. 1:27Naming in Go
  3. 9:58Avoiding if statements
  4. 14:28mainr run
  5. 20:08Helper functions in Go
  6. 28:21Design clarity in Go
  7. 30:48Summary
~/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.