I trying to disable Keep-Alive Connection in golang but there is no clear explanation about how to do it..
package main
import (
"net/http"
"github.com/julienschmidt/httprouter"
"fmt"
)
func helloworld(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
fmt.Fprint(w, "Hello, World!")
}
func main() {
router := httprouter.New()
router.GET("/", helloworld)
fmt.Println("Running :-)")
http.Server.SetKeepAlivesEnabled(false)
log.Fatal(http.ListenAndServe(":3030", router))
}
can anybody solve this?