EZ

Eduzan

Learning Hub

Eduzan
Eduzan / Go Programming Language

Pointers in Go (Golang)

Worked examples are fully visible. Check-yourself items are study aids you can reveal one at a time.

A pointer is a variable that stores the memory address of another variable. In Go, pointer types look like *int, *string, *MyStruct, etc.

  • &x → “address of x”
  • *p → “value at the address stored in p” (dereference)

End of lesson.