unsupported Scan, storing driver.Value type []uint8 into type *time.Time 解决方案

  数据库取数据的字段为created_at,数据库中类型是TIMESTAMP,容许NULL,此时在取数据的时候就会出现这种报错。数据库

  解决方案:在数据库链接的字符串中添加:&parseTime=True,样例格式:root:root@tcp(127.0.0.1:3306)/db?charset=utf8&parseTime=Truetcp

相关文章
相关标签/搜索