Menu

vInsert.nl

What am I even on about

Golang Readers and Writers

Reader, Writer, ReaderWriter and ReaderWriterCloser are interfaces, interfaces that simply implement Read, Write, Close or any combination. They all take a simple byte slice as their only parameter. Either reading to, or reading from these buffers.
(more…)

Golang WaitGroup

WaitGroup is fairly simple to understand and use, since it’s just a counter that stops blocking when it hits zero. You add to the counter before you create a goroutine, and subtract from the counter once the goroutine is done. You can utilize this to make a thread ‘wait’ for other concurrent operations to finish.
(more…)