Data, Technology & EngineeringExplore OptionsFocus & PrepareTake Action

Generics in Go

Repeating code by writing boilerplate code over and over again can often lead to mistake-ridden, messy code. In this course, Anna-Katharina Wickert shows you how to use generics in Go to write cleaner and easier-to-read code. Anna-Katharina shows how you can use generics—long on developers’ wishlists and introduced in Go 1.18—to write functions and types that work with a set of types instead of one concrete type. She covers type parameters, typesets, and type inference, and puts it all into practice with examples and looks into new packages shipped along with generics.

Learn More