Go pointers
A pointer stores the memory address of a value rather than a separate copy of that value. Dereferencing a pointer accesses the value at that address, and a nil pointer points to no value.
Minimal example
func main() {
count := 5
ptr := &count
*ptr = 8
fmt.Println(count)
}Learn this concept
Lesson 1.5 · Structs, pointers, slices and mapsUsed in exercises
Exercise 1.8 · Practice: write your first Go program Exercise 1.11 · Token bucket limiter with lazy refillPrerequisite conceptsGo structs