Having this struct
type Square struct {
Side int
}
Are these to functions equivalent?
func (s *Square) SetSide(side int) {
s.Side = side
}
vs
func SetSquareSide(s *Square, side int) {
s.Side = side
}
I know they do the same, but are they really equivalent? I mean, is there any internal difference or something?
Try online: https://play.golang.org/p/gpt2KmsVrz