Scan error on column index 3: unsupported Scan, storing driver.Value type []uint8 into type *time.Ti

使用gorm框架,数据库使用的mysql  直接上解决办法 最后加上这个即可

parseTime=true

db,err:=gorm.Open("mysql","用户名:密码@tcp(localhost:3306)/数据库名?charset=utf8&parseTime=true")

猜你喜欢

转载自blog.csdn.net/qq_32319999/article/details/80944664