As programs grow, you need ways to organize code and avoid writing the same logic again and again. Go gives you packages and modules for structure, and generics for writing functions and types that work with many different types while staying type-safe.
This module starts with packages: splitting code into files and folders and importing it where it is needed. It then covers modules, how your own packages fit into a Go project, and finishes with generics, including type parameters and constraints.
Watch the lessons in order and split one of your own small programs into packages as you go, then continue on to Concurrency: Goroutines & Channels.
What packages are in Go and how they let you split a program into reusable pieces.
How modules and packages work together, and how to use your own packages inside a Go project.
A quick overview of generics in Go, a good first look before the longer tutorial that follows.
A fuller walkthrough of generics: writing functions and types with type parameters, and limiting them with constraints.