
gorm
gorm
、Edgar
Coding with fun
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Http状态码对应的状态
ValueDescription Reference 100Continue[RFC7231, Section 6.2.1]101Switching Protocols[RFC7231, Section 6.2.2]102Processing[RFC2518]103Early Hints[RFC8297]104-199Unassigned200OK[RFC7231, Section 6.3.1]201Created[RFC7231, Section 6.3.2]202Accepted[RFC7231, Se原创 2020-09-01 20:33:25 · 1586 阅读 · 0 评论 -
unsupported destination, should be slice or struct
某次如下使用gorm的时候出现以下的错误:DB.Model(&model.Captcha{}).Find(data)unsupported destination, should be slice or struct其实之前我使用过一样的方式写过代码,当时请求的时候是正确的,不过这次就????,一言难尽后来在stackoverflow上面问了这个问题,在这里总结一下使用结构体接收数据如果直接使用var data *structType 来定义变量接收数据,由于没有进行初始化,所以刚开原创 2020-08-23 13:01:09 · 5071 阅读 · 2 评论