~/talk

Intro to Test-Driven Development in Go

Talkat GoCon Canada 2019 · on Friday, 2019-05-31· [testing, go]
slides:none on file

Shows a concrete red green refactor workflow in Go: start with a failing test for a hello(name) function, hard‑code to pass, then generalize and refactor; uses go test for running, benchmarks, coverage and race detection. Demonstrates injecting interfaces and using generated fakes with counterfeiter to assert collaborator calls, and compares plain go assertions to richer matchers like kingcoat and go mega. Recommends deleting redundant tests to keep feedback fast and designs for explicit inputs to avoid global state.

AI-written summary · about

  1. 0:00Introduction to TDD in Go
  2. 2:10What is test-driven development
  3. 5:21Using TDD in Go
  4. 14:09Why TDD helps developers
  5. 20:09TDD improves software design
  6. 27:14Q&A and resources
~/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.