feat: update

This commit is contained in:
2025-12-16 14:58:08 +08:00
parent 512859b5c7
commit dbea493ba3
8 changed files with 72 additions and 396 deletions

View File

@@ -40,6 +40,11 @@ func (e *AppError) WithMsg(msg string) *AppError {
return e
}
func (e *AppError) WithMsgf(format string, args ...any) *AppError {
msg := fmt.Sprintf(format, args...)
return e.WithMsg(msg)
}
// WithSQL 记录SQL信息
func (e *AppError) WithSQL(sql string) *AppError {
e.sql = sql