You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
349 B
19 lines
349 B
//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.Second
|
|
s.WriteTimeout = 10 * time.Second
|
|
s.MaxHeaderBytes = 1 << 20
|
|
return s
|
|
}
|