All tagged interfaces

Constraints in Go

Freedom is nothing without constraints, and Go’s generics gives us a powerful way to build polymorphic types and functions constrained by type sets. Let’s geek out.

Generics in Go

Generics what now? This friendly, down-to-earth tutorial series explains how Go’s generic functions and types work, why we need them, and where we can use them.

The adapter pattern in Go

How do you test a database without a database? Don't worry, this isn't one of those Zen puzzles. I have something more practical, but equally enlightening, in mind. Let’s use the adapter pattern to solve the riddle.

Are you a Go black belt?

Are you a grasshopper or a Go sensei? Can you wax on, wax off? Go mentor and would-be Mr Miyagi, John Arundel, explains how he grades his students using a system of coloured belts like those used in the martial arts. Find out how your skills compare to typical junior, mid-level, and senior devs!

map[string]interface{} in Go

What is a map[string]interface{} or map[string]any in Go, and why is it so useful? How do we deal with maps of string to interface{} in our programs? What the heck is an interface{}, anyway?