When should you prefer a pointer receiver over a value receiver for a Go method?
-
A
When the method needs to mutate the struct or when the struct is large to avoid copying
-
B
Only when the struct contains a map or slice
-
C
Whenever the method returns a value
-
D
Pointer receivers should always be avoided for simplicity