错误信息
sql: Scan error on column index 1, name "created_at": unsupported Scan, storing driver.Value type []uint8 into type *time.Time

解决方案
在连接数据库的末尾加上parseTime=true,如下:

Db, err = gorm.Open("mysql", "username:password@tcp(127.0.0.1:3306)/gin?charset=utf8&parseTime=true")

相关文章:

  • 2022-01-07
  • 2021-11-20
  • 2021-11-20
  • 2021-07-12
  • 2021-06-15
  • 2021-07-28
  • 2021-12-10
猜你喜欢
  • 2021-07-13
  • 2021-11-20
  • 2022-12-23
  • 2022-02-25
  • 2021-11-20
  • 2022-12-23
相关资源
相似解决方案