摘要:
在之前的博文中,多次说过:log是现象,还可能是假象,不可全信。 在实际开发中,见过太多太多这样的案例。 来看看最近遇到的一个让人临时怀疑人生的问题, go伪代码如下: type Money struct { Principal int } func main(){ p := new(Money) 阅读全文
摘要:
结构体(struct): 多个父类结构体继承 //父类 type person04 struct { name string age int sex string } //父类 type Person04 struct { id int addr string } //子类 type Student 阅读全文
摘要:
模型定义示例 type User struct { gorm.Model Name string Age sql.NullInt64 Birthday *time.Time Email string `gorm:"type:varchar(100);unique_index"` Role strin 阅读全文