projectx/cmd/server_win.go
2025-03-21 11:05:42 +08:00

20 lines
324 B
Go

//go:build windows
// +build windows
package cmd
import (
"net/http"
"time"
)
func InitServer(address string, router http.Handler) server {
return &http.Server{
Addr: address,
Handler: router,
ReadTimeout: 20 * time.Second,
WriteTimeout: 20 * time.Second,
MaxHeaderBytes: 1 << 20,
}
}