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.

18 lines
332 B

  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. }