server_win.go 333 B

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