How to Use Struct Pointers in Go

Use struct pointers in Go by declaring variables with the `*` prefix and accessing fields directly via the dot operator.

Use struct pointers in Go by declaring a variable with the * prefix, accessing fields with the . operator, and passing the address using & to modify the original struct.

package main

type Person struct {
	Name string
	Age  int
}

func main() {
	p := &Person{Name: "Alice", Age: 30}
	p.Age = 31
	println(p.Name)
}