~/talk

"Common tips & mistakes" in Go — and How to Fix Them

TalkinFrenchat Devoxx France 2023 · 2023-04-12..04-14· [go]
slides:none on file

Practical fixes for common Go pitfalls: use an IDE for live import/unused-var checks, write table-driven tests and run linters like golangci-lint, and prefer returning errors over panics except at startup. Always defer resp.Body.Close() and capture its error with an anonymous defer, propagate context cancellations through call stacks, use utf8.RuneCountInString for character counts, crypto/rand for secure randomness, io.TeeReader to read a stream twice, and use goreleaser for cross‑compile releases.

AI-written summary · about

  1. 0:00Start
  2. 2:24UNIT TESTS
  3. 3:46STATIC LINT
  4. 9:28CHECK ERRORS EVERYTIME
  5. 10:28BREAK CORRECTLY A LOOP/SWITCH
  6. 13:22MAPS USE DEFAULT ZERO VALUE
~/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.