20 lines
324 B
Go
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,
|
|
}
|
|
}
|