GO - Golang Online Test Practice Test
GO Structs and Methods 2
When should you prefer a pointer receiver over a value receiver for a Go method?
Select your answer
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
Hint
✨ Remove Ads & Unlock Every Exam
— From $1.49