Go does not have classes. Instead, you attach behavior to your own types with methods and describe shared behavior with interfaces. This small, flexible model is behind most idiomatic Go code, from the standard library to large production systems.
This module starts with pointers, since they decide whether a function or method works on a copy or on the original value. It then covers struct methods, how to choose between value and pointer receivers, and finally interfaces, which let different types be used through the same set of behaviors.
Watch the lessons in order and experiment with your own types, then continue on to Error Handling.
Pointers in Go: the difference between reference and value, when you should use a pointer, and how the address and dereference operators work.
Struct methods: attaching functions to your own types so that data and behavior live together.
A detailed look at value and pointer receiver methods with examples, so you can decide which one a method should use.
Interfaces in Go: describing behavior so that different types can be used interchangeably.