修复Windows下编译endless失败问题

This commit is contained in:
徐志伟
2020-06-30 12:43:21 +08:00
parent 990fd1f4f3
commit 9a0c74e04c
3 changed files with 36 additions and 21 deletions
+19
View File
@@ -0,0 +1,19 @@
// +build windows
package core
import (
"github.com/gin-gonic/gin"
"net/http"
"time"
)
func initServer(address string, router *gin.Engine) server {
return &http.Server{
Addr: address,
Handler: router,
ReadTimeout: 10 * time.Second,
WriteTimeout: 10 * time.Second,
MaxHeaderBytes: 1 << 20,
}
}