~/talk

How to Mock Fellow Gophers While Avoiding HR

Talkat GopherCon 2024 · 2024-07-07..07-10· [testing]
links:none on file
slides:none on file

Mocks cause cross-team breakage when exported: gomock gets archived, Uber forks it, CI fails because controller types differ. Advice is concrete: don't export mocks, put package-only mocks in a file like thing_mock_test.go or in an internal/mock package, and deduplicate shared fakes there. For generators, install them per-module (not global), commit generated files or define a reproducible go:generate or team build target, and ensure test imports point to the same mock package so CI stays stable.

AI-written summary · about

~/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.