refactor: extract path logic to path.go and run go fmt on codebase

This commit is contained in:
duorameng
2026-05-22 14:52:51 +08:00
parent b6fd889661
commit 4c283a60d5
55 changed files with 409 additions and 420 deletions
+3 -3
View File
@@ -64,9 +64,9 @@ func Init(cfg *Config) error {
log.New(os.Stdout, "\r\n", log.LstdFlags), // io writer
gormlogger.Config{
SlowThreshold: time.Millisecond * 500, // 慢 SQL 阈值,默认是 200ms,这里改为 500ms
LogLevel: gormlogger.Warn, // 日志级别
IgnoreRecordNotFoundError: true, // 忽略 ErrRecordNotFound(找不到记录)错误
Colorful: true, // 禁用彩色打印
LogLevel: gormlogger.Warn, // 日志级别
IgnoreRecordNotFoundError: true, // 忽略 ErrRecordNotFound(找不到记录)错误
Colorful: true, // 禁用彩色打印
},
)
-1
View File
@@ -95,7 +95,6 @@ func getModelSignature(models []interface{}) string {
return hex.EncodeToString(hash[:])
}
// customMigrations 自定义迁移(处理 AutoMigrate 无法自动完成的变更)
func customMigrations() error {
// 检查 ql_tokens 表是否存在