Comparison with Functions
Go methods are similar to the Go function with one difference, namely that the method contains a receiver argument. With the help of the receiver argument, the method can access the receiver's properties.
Here, the receiver can be of frame type or not. When you create a method in your code, the receiver and receiver type must be present in the same package.
func (r Receiver) Method(param string) {...}