mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-04 17:15:58 +08:00
Error code standardization
This commit is contained in:
@@ -69,11 +69,11 @@ func (w Writer) Printf(format string, args ...interface{}) {
|
||||
fmt.Printf(format, args...)
|
||||
}
|
||||
|
||||
func getDBConn(db *gorm.DB, tx []any) *gorm.DB {
|
||||
if len(tx) > 0 {
|
||||
if txDB, ok := tx[0].(*gorm.DB); ok {
|
||||
return txDB
|
||||
}
|
||||
}
|
||||
return db
|
||||
}
|
||||
//func getDBConn(db *gorm.DB, tx []any) *gorm.DB {
|
||||
// if len(tx) > 0 {
|
||||
// if txDB, ok := tx[0].(*gorm.DB); ok {
|
||||
// return txDB
|
||||
// }
|
||||
// }
|
||||
// return db
|
||||
//}
|
||||
|
||||
Reference in New Issue
Block a user