Need Assistance?

support@tutorialshub.in

Pointers, Defer, Panic & Recover

Pass by Value vs Pass by Pointer

ADVERTISEMENT
Go (Golang) Free Lesson
5 min read
ADVERTISEMENT

Everything in Go is passed by value (copied). Pass a pointer (*User) when a function needs to mutate the struct or avoid copying a large struct.

ADVERTISEMENT
Hi, I'm Tuby! Here to help you