GO LEARNING PATH · 5 LESSONS
Types you define
Structs, methods, pointers, and functions that are values.
A struct is data, and its fields have names
Declare a struct type and build values of it without positional guessing.
3 min · Worked lesson
A method is a function with a receiver
Put a method on your own type and choose the receiver deliberately.
3 min · Worked lesson
A pointer is for changing something, not for speed
Say when a pointer is required and when it is only noise.
3 min · Prediction challenge
A function is a value, and it remembers where it came from
Return a function that carries state, and know what it captured.
3 min · Worked lesson
Returning a pointer to a local is fine
Explain why Go lets you return the address of a local variable.
3 min · Prediction challenge