Routing Enhancements for Go 1.22

I have this in the init func for main 
    http.HandleFunc("GET /posts", handlePost2)

Yet, in the browser, when http://127.0.0.1/posts is entered, it returns
404 page not found.

Am I doing something wrong? Maybe the problem lies elsewhere?
Thank you,
Roger

func handlePost2(w http.ResponseWriter, r *http.Request) {
    fmt.Fprint(w, "GET test handlePost2")
}

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/3b61f51e-b302-46f8-80f3-45af882f4e37n%40googlegroups.com.

Reply via email to