server_win.go 352 B

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