最近发布的主题
暂无
最近发布的文章
暂无
最近分享的资源
暂无
最近发布的项目
暂无
最近的评论
-
package main import ( "fmt" "net/http" ) type AppHandler struct { appName string } func(index *AppHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "hello, %s!", index.appName) } func main() { index := new(AppHandler) index.appName = "sample app" http.Handle("/", index) http.ListenAndServe(":8080", nil) }