package main
import (
"net/http"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request){
w.Write([]byte("hello world"))
})
http.ListenAndServe(":8000", nil)
}
作为 golang 初学者,不能理解"r *http.Request "为什么不需要实际参数,r 是存储在哪里的。 "w http.ResponseWriter"也不需要实际参数吗。这从语法上怎么理解?