优化server初始化的方式

This commit is contained in:
2025-02-07 18:33:07 +08:00
parent 5d19efa8cf
commit a50883b734
2 changed files with 38 additions and 9 deletions

View File

@ -32,7 +32,7 @@ type Test struct {
func Test_parseController(t *testing.T) {
SetValidateErrTag("err_msg")
r := gin.Default()
Group(r, "test", nil, TestController{})
r.Run(":8080")
s := NewServer(8080, nil)
s.Group("test", nil, TestController{})
s.Start()
}