监听端口号后修改代码,重新run 后,发现还是原来的程序,换端口后有效
```go package main import ( "fmt" "net/http" ) func main() { http.HandleFunc("/", handler) http.HandleFunc("/hello", hello) http.ListenAndServe("localhost:8884", nil) } func handler(w http.ResponseWriter, req *http.Request) { req.ParseForm() if len(req.Form["name"]) > 0 { fmt.Fprint(w, "你好,", req.Form["name"][0]) } els...阅读全文