init project

This commit is contained in:
2025-04-09 12:17:33 +08:00
parent 6840d5d5e3
commit f6622a4e98
392 changed files with 55744 additions and 3 deletions

19
core/server_other.go Normal file
View File

@@ -0,0 +1,19 @@
//go:build !windows
// +build !windows
package core
import (
"time"
"github.com/fvbock/endless"
"github.com/gin-gonic/gin"
)
func initServer(address string, router *gin.Engine) server {
s := endless.NewServer(address, router)
s.ReadHeaderTimeout = 10 * time.Minute
s.WriteTimeout = 10 * time.Minute
s.MaxHeaderBytes = 1 << 20
return s
}