19 followers
Golang software development and training.
For information and rates: paul.digi4n@gmail.com
Subscribe to my newsletter and never miss my upcoming articles
We already discussed when to use constructors and when let the user of your library initialize their structures. The short version is that if the...
The Golang standard library comes with a simple interface, context.Context, which is a little harder to understand and use than the others. The...
Go standard library comes with a nice little structure that allows to stop long-running goroutines, when theirs result is not needed anymore:...
In go there are two ways to create structures. Either you instantiate the structure directly, populate its fields. Or you use a constructor, that will...
Today I found a small mistake in our codebase. The code was like this: type Foo struct { baz []int } // ... func (f *Foo) Fun(a int) { if...
Usually when doing any IO, either over network or against disk, there are always at least two options. Execute each IO operation by itself. Execute...