jjzjj

AddFeedbackHandler

全部标签

http - 如何将 http.HandleFunc 与 slugs 一起使用

我正在做一个Go项目。当我尝试将slugs与http.HandleFunc一起使用时,我收到“404页面未找到错误”。当我取出子弹时,我的路由再次工作。主要有:http.HandleFunc("/products/feedback/{slug}",AddFeedbackHandler)调用:varAddFeedbackHandler=http.HandlerFunc(func(whttp.ResponseWriter,r*http.Request){w.Write([]byte("ChecksOut"))})当我将路径替换为:http.HandleFunc("/products/fee