This commit is contained in:
12600k-rog-d4
2025-12-09 20:33:57 +08:00
parent 144ed3cbdf
commit 8f4d399cfd
1498 changed files with 3778 additions and 3654 deletions

View File

@@ -0,0 +1,28 @@
package event
import (
"bbs-go/internal/models"
"fmt"
"reflect"
"testing"
"github.com/mlogclub/simple/common/jsons"
"github.com/mlogclub/simple/sqls"
)
func TestEvent(t *testing.T) {
//var w sync.WaitGroup
//w.Add(1)
RegHandler(reflect.TypeOf(models.User{}), func(i interface{}) {
fmt.Println("处理用户1")
fmt.Println(jsons.ToStr(i))
})
RegHandler(reflect.TypeOf(models.User{}), func(i interface{}) {
fmt.Println("处理用户2")
fmt.Println(jsons.ToStr(i))
})
Send(models.User{
Username: sqls.SqlNullString("test"),
})
//w.Wait()
}