← Course map

GO LEARNING PATH · 5 LESSONS

Types you define

Structs, methods, pointers, and functions that are values.

  1. 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

  2. A method is a function with a receiver

    Put a method on your own type and choose the receiver deliberately.

    3 min · Worked lesson

  3. 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

  4. 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

  5. Returning a pointer to a local is fine

    Explain why Go lets you return the address of a local variable.

    3 min · Prediction challenge