#100daysofcode
Read more stories on Hashnode
Articles with this tag
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...