Pointer receiver — can modify. Value receiver — works on copy.
*Pointer receiver (T):
1type Counter struct {2 count int3}45// Pointer receiver — can modify6func (c *Counter) Increment() {7 c.count++ // Modifies original8}
Value receiver (T):
1type Point struct {2 X, Y int3}45// Value receiver — works on copy6func (p Point) Distance() float64 {7 return math.Sqrt(float64(p.X*p.X + p.Y*p.Y))8}
Guidelines: