Hi I am working on a golang project. When I try to use slugs with http.HandleFunc I get a "404 page not found error". When I take the slug out my routing works again.
In main I have:
http.HandleFunc("/products/feedback/{slug}", AddFeedbackHandler)
Which calls:
var AddFeedbackHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request){
w.Write([]byte("ChecksOut"))
})
When I replace the path with:
http.HandleFunc("/products/feedback", AddFeedbackHandler)
It works again. What might be causing this? Please forgive me if this is a basic question, I am new to golang and still trying to get the hang of it. Thanks!