New YouTube Channel: Boldly GoAre you a Go developer? Thinking of learning Go? Check out my new YouTube channel: Boldly Go!
Are you a Go developer? Thinking of learning Go?
If so, you might be interested in my new YouTube channel, Boldly Go.
I will be using this new channel as a place to post Go code review, coding techniques, and tutorials, and other topics specifically related to Go. This channel is far more tactical, and “down in the weeds” than the material I typically post to this list, since this list is intended for a much broader audience.
This also means I won’t typically be announcing new content on Boldy Go to this channel, as it has a minimal overlap with the types of people on this list. But I would feel remiss if I didn’t at least mention it once. So consider this that once, and hop on over there and subscribe if it’s a topic that appeals to you. :)
My most recenty video is about a recent bug I found in a popular Go linter, as well as in Go 1.18:
The Dangers of Fatal Logging
log.Fatal violates the Single Responsibility Principle in insidious ways. Never use it!
Simple Go Mocks
Go’s interfaces and “duck typing” makes it very easy to create simple mock or stub implementations of a dependency for testing. This has not dissuaded a number of people from writing generalized mocking libraries such as gomock and testify/mock, among others. Here I want to describe a simple alternative pattern I frequently use when writing tests for an interface, that I think is generally applicable to many use cases. No Silver Bullet Of course neither this approach, nor any other, is a one-size-fits-all solution.