The problem of taking address and value by golang method

here is a sample code for adding, deleting, modifying and querying users:

// Create creates a new user account.
func (u *User) Create() error {
    return DB.Self.Create(&u).Error
}

// Update updates an user account information.
func (u *User) Update() error {
    return DB.Self.Save(u).Error
}

question:
Why should Create (& u) use the address and Save (u) use the value?

Mar.10,2022

feels misused. The first to create, u itself is a pointer type, so there is no need to get the pointer of the pointer.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3bc02-2c2c1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3bc02-2c2c1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?