![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
go
SmallQinYan
等待,并心怀希望
展开
-
go日志系统logrus显示文件和行号
logrus默认不支持显示文件名和行号,不太友好,但是在v1.2.0版本已经修复。可以通过setReportCaller设置即可显示文件名和行号原创 2019-12-15 11:26:59 · 4621 阅读 · 2 评论 -
gorm设置外键不生效问题
有两张表type App struct { Id uint `gorm:"primary_key;type int(11) unsigned auto increment"` Name string Desc string}type Data stuct { Id uint `gorm:"primary_key;type int(11) unsigned...原创 2019-11-23 19:25:13 · 3795 阅读 · 0 评论