What is the difference between these two writing methods?

Aug.12,2021

it is recommended to take a look at the related description in the Go language Bible: 6.2. The greatest use of methods based on pointer objects


pointer receiver is that you can modify the value pointed to by receiver


u1 = User{}
u2 = &User{}

u1.Get1()
u1.Get2() //,

u2.Get1() //
u2.Get2() //, 
.
Menu