草庐IT

viewHandler

全部标签

http - 无法在 Go 中调用 http.HandleFunc

我对Backbone和Go还很陌生,尝试根据URL调用函数。这是我在Router中的代码,请求从那里转到Go页面。collection.fetch({url:"/bands"}).done(function(data){console.log("hello");});这是我处理所有请求的代码:funcviewHandler(whttp.ResponseWriter,r*http.Request){fmt.println("inviewHandler")}funcmain(){http.Handle("/",http.FileServer(http.Dir("../")))http.Ha