Change from to net/http

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() {
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())

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.