type HandleFnc func(http.ResponseWriter, *http.Request)
/* handle a simple get request */ funcSimpleServer(w http.ResponseWriter, request *http.Request) { io.WriteString(w, "<h1>hello, world</h1>") }
/* handle a form, both the GET which displays the form and the POST which processes it.*/ funcFormServer(w http.ResponseWriter, request *http.Request) { w.Header().Set("Content-Type", "text/html") switch request.Method { case"GET": /* display the form to the user */ io.WriteString(w, form) case"POST": /* handle the form data, note that ParseForm must be called before we can extract form data*/ //request.ParseForm(); //io.WriteString(w, request.Form["in"][0]) io.WriteString(w, request.FormValue("in")) } }