Methods vs Functions , Understanding how to use receivers in Go
Apr 20, 2023 · 3 min read · Imagine a scenario Where we have a struct type with some fields and we want to define methods that can access and modify those fields. Defining a method & function in Go is as follows: func (receiverName ReceiverType) MethodName(parameters) (returnTy...
Join discussion