u
This commit is contained in:
1 parent
098a061308
commit
994321d049
40 files changed
+1401
-359
No files matched your search
@@ -5,6 +5,7 @@ import (
|
||||
"base-go-v2/internal/config"
|
||||
"base-go-v2/internal/db"
|
||||
"base-go-v2/internal/logx"
|
||||
"base-go-v2/internal/utils/idgen"
|
||||
"fmt"
|
||||
"github.com/valyala/fasthttp"
|
||||
"log"
|
||||
@@ -30,6 +31,10 @@ func main() {
|
||||
|
||||
log.Printf("✅ 服务器启动成功,端口%s", addr)
|
||||
|
||||
// 配置id
|
||||
options := idgen.NewIdGeneratorOptions(1)
|
||||
idgen.SetIdGenerator(options)
|
||||
|
||||
// 启动服务器(简洁写法)
|
||||
if err := fasthttp.ListenAndServe(addr, r.Handler); err != nil {
|
||||
log.Fatalf("❌ 服务器启动失败: %v", err)
|
||||
|
||||
Reference in new issue
Block a user