John DoakGo: 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.6d ago6d ago
John DoakGo: Faking Method Calls Within a StructThis is a follow up on an article I wrote on using functional State Machines to ease testing requirements.Jul 26Jul 26
John DoakGo: 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…Mar 99Mar 99
John DoakWriting an interface that only sub-packages can implementSometimes we need to provide an interface that we only want our packages to implement.May 11, 20231May 11, 20231
John DoakTesting 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…Apr 28, 2023Apr 28, 2023
John DoakinDev GeniusGo: Support Universal Binaries Using Shell ScriptIntroductionAug 16, 2022Aug 16, 2022
John DoakinDev GeniusGo: Call option that can be used with multiple methodsAllow shared options in function and method calls, now with type safety!Aug 4, 2022Aug 4, 2022
John DoakGo: Using SSH and Domain Sockets For ServingHave you ever found the need to secure access to administrative traffic? This might be a system agent or a diagnostic endpoints for a…Nov 4, 2021Nov 4, 2021
John DoakThis article does a good job of summing up speed differences. Here are a few notes:gRPC is going to win here because of the JSON encode/decode speed:May 22, 2021May 22, 2021