Generics introduces a whole new kind of interface to Go: one based not on methods, but on type sets. Let’s explore the possibilities.
All tagged interfaces
Generics introduces a whole new kind of interface to Go: one based not on methods, but on type sets. Let’s explore the possibilities.
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 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.
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.
In Part 2 of a series about writing packages, not programs, we see how to test a package that prints to the terminal, and use the result to build our “hello, world” CLI tool.
If you’re a BIT student, are you ready for your green belt test? If you’re studying independently, check your Go skills and see whether you’d pass this demanding certification.
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!
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?