Latest writing
All posts →NewestOct 1, 2022 · 9 min read
Testing complex workflows in Go
A testify/suite style that keeps sophisticated fixtures, mocks, edge cases and complex outputs readable as the test cases multiply.
Read the article →// Before every test, fresh mocks and fixtures
func (s *CollectorSuite) SetupTest() {
s.mocks = Mocks{}
s.fix = Fixtures{input: happyPath()}
s.expect = Expectations{}
}
func (s *CollectorSuite) TestRateLimited() {
s.mocks.ListUGC(Fail)
s.run()
}Advanced Go Error Handling Made Simple
Go handles errors explicitly. Here is how to carry richer context through your errors without giving up that simplicity.
Defusing an ElasticSearch Mapping Explosion with Slots
When user-defined fields threaten to blow up your index mapping, a fixed set of reusable slots keeps it under control.
Reducing System Load With Event Folding
Collapsing bursts of redundant events into a single unit of work, and the maths behind how much load it saves.
Building a Comfortable Dev Environment
The tools, aliases and habits that make the daily grind of git, docker, kubectl and friends feel effortless.
Prefer a feed reader? Subscribe via RSS
