9
我在GAE中使用gorilla mux时遇到了一些问题。GAE Golang Gorilla mux - 404页未找到
当我尝试它,我'404页未找到'。没有调用rootHandler函数(没有生成痕迹)
下面是我的代码的一部分,有什么想法吗?
THK提前
...
func init() {
r := mux.NewRouter()
r.HandleFunc("/",rootHandler)
}
func rootHandler(w http.ResponseWriter, r *http.Request) {
var functionName = "rootHandler"
c := appengine.NewContext(r)
c.Infof(functionName+"-start")
defer c.Infof(functionName+"-end")
...
thk,完美答案。现在工作 – rlasjunies