标签:lan model test lang print UNC main new verify
func main() {
a := models.SmsVerify{}
a.Id = 100
fmt.Println(a.Id) // 100
test111(a)
fmt.Println(a.Id) // 100
a222 := new(models.SmsVerify)
a222.Id = 200
fmt.Println(a222.Id) // 200
test222(a222)
fmt.Println(a222.Id) // 201
}
func test111(sms models.SmsVerify) {
sms.Id++
}
func test222(sms *models.SmsVerify) {
sms.Id++
}
标签:lan model test lang print UNC main new verify
原文地址:https://www.cnblogs.com/sweetXiaoma/p/11804363.html