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.

21 lines
353 B

3 years ago
  1. //go:build windows
  2. // +build windows
  3. package core
  4. import (
  5. "net/http"
  6. "time"
  7. "github.com/gin-gonic/gin"
  8. )
  9. func initServer(address string, router *gin.Engine) server {
  10. return &http.Server{
  11. Addr: address,
  12. Handler: router,
  13. ReadTimeout: 20 * time.Second,
  14. WriteTimeout: 20 * time.Second,
  15. MaxHeaderBytes: 1 << 20,
  16. }
  17. }