Hi ,
i was writing a go program and initially someone suggested to use fasthttp , but not i was informed its no longer supported i need to move to Net/http.
how do i move to Net/http. My current code
func main() {
flag.Parse()
h := requestHandler
if *compress {
h = fasthttp.CompressHandler(h)
}
if err := fasthttp.ListenAndServe(*addr, h); err != nil {
log.Fatalf(“Error in ListenAndServe: %s”, err)
}
}
func requestHandler(ctx *fasthttp.RequestCtx) {
var request_api = string(ctx.RequestURI())