这是我用Go语言和gorillamux包编写的一个小型演示网络服务器的代码:packagemainimport("fmt""github.com/gorilla/mux""net/http")funchandler(whttp.ResponseWriter,r*http.Request){vars:=mux.Vars(r)fmt.Fprintf(w,"Hithere,Ilove%s!",vars["username"])}funchomeHandler(whttp.ResponseWriter,r*http.Request){ifr.URL.Path!="/"{errorHandler