GoLang Tutorials for Beginners | Step by Step Guideline | Value & Pointer Receiver Methods | Part 2
In GoLang, we have a way to by which we can achieve similar functionality like class and methods using Structs and associated methods. Though these methods are not defined within the struct rather they’re associated with the struct. We can either let these methods just access data via working as a copy of the struct which is called Value Receivers, or we can actually point through and modify the original struct which is called Pointer Receivers. In terms of performance, Pointer Receivers are more efficient as they don’t copy the whole struct again into the local scope. thus generating less garbage to cleanup.