John Doak·Mar 10Stringer 2: The RevengeOne of the most useful tools that the Go team has provided is the stringer tool.
John Doak·Nov 5, 2025Auto-Cleanup Weak Pointer CachesIntroduction to Weak Pointer Caching with Automatic CleanupA response icon1A response icon1
John Doak·Jun 30, 2025Fsets, a useful pattern for testingOne of the things that is always a struggle is testing call chains.
John Doak·Oct 21, 2024Go: Optional Arguments in the age of GenericsGo’s standard method of providing optional arguments to functions has been a combination of a function type and variadic arguments.A response icon6A response icon6
John Doak·Jul 26, 2024Go: Faking Method Calls Within a StructThis is a follow up on an article I wrote on using functional State Machines to ease testing requirements.
John Doak·Mar 9, 2024Go: And Leave Your Java Factories BehindRecently I saw an article come up about using the Go Factory pattern. The article was encouraging people to use a pattern that may have a…A response icon13A response icon13
John Doak·May 11, 2023Writing an interface that only sub-packages can implementSometimes we need to provide an interface that we only want our packages to implement.A response icon1A response icon1
John Doak·Apr 28, 2023Testing gRPC methodsI was recently asked by a colleague on the best way to test a gRPC method for streaming. They were trying to find a simple way to test…