07 2023 档案
gorm使用Save方法处理时间字段的坑
摘要:视频地址 Gorm中Save方法处理时间字段的坑 测试代码以及说明 package gorm_tests import ( "fmt" "github.com/stretchr/testify/require" "gorm.io/driver/mysql" "gorm.io/gorm" "testi 阅读全文
posted @ 2023-07-27 11:34 江湖乄夜雨 阅读(1098) 评论(0) 推荐(0)
使用golang灵活处理动态文案
摘要:代码 package scripts_stroage import ( "fmt" "github.com/duke-git/lancet/v2/slice" "github.com/gogf/gf/util/gconv" "github.com/gookit/goutil/dump" "regex 阅读全文
posted @ 2023-07-22 20:49 江湖乄夜雨 阅读(108) 评论(0) 推荐(0)
Gorm中查询是否返回recordNotFound的情况总结
摘要:代码 package gorm_tests import ( "fmt" "github.com/gogf/gf/util/gconv" "github.com/stretchr/testify/require" "gorm.io/driver/mysql" "gorm.io/gorm" "test 阅读全文
posted @ 2023-07-18 15:58 江湖乄夜雨 阅读(1038) 评论(0) 推荐(0)
kratos中集成定时任务介绍
摘要:项目地址 https://gitee.com/huoyingwhw/kratos-cron-task 碎碎念 定时任务项目是笔者从Python程序员转Golang做的第一个项目,记得当时项目没有用固定的框架,每个功能都是做的“缝合”,写法相对来说自由一些。 而且定时任务实现起来也相对自由一些,最简单 阅读全文
posted @ 2023-07-10 15:31 江湖乄夜雨 阅读(1532) 评论(0) 推荐(0)