packagemainimport("fmt""net/http")varindexHtml=`<!doctype html><html><head><title>Get Form POST Value</title></head><body><form action="/post" method="post"> <input name="myValue"> <button>Send</button></form></body></html>`funchandler(whttp.ResponseWriter,r*http.Request){fmt.Fprintf(w,indexHtml)}funcpostHandler(whttp.ResponseWriter,r*http.Request){fmt.Fprintf(w,r.PostFormValue("myValue"))}funcmain(){http.HandleFunc("/",handler)http.HandleFunc("/post",postHandler)http.ListenAndServe(":8000",nil)}