Lesson 7 of 60
GoStructs, Methods, and Interfaces
25 minutes
Course progress12%
Structs
This lesson explains the main concept clearly with beginner-friendly examples and background so you can learn why the code works.
Structs group related fields.
type Person struct {
Name string
Age int
}
p := Person{Name: "Bob", Age: 30}