Answer the question
In order to leave comments, you need to log in
Feature of HandleFunc in Go?
func index(w http.ResponseWriter, r *http.Request) {
fmt.Println("Index page")
}
Answer the question
In order to leave comments, you need to log in
Well, probably because ResponseWriter is an interface, that is, in fact, it is the pointer that is passed.
And Request is a structure.
piotrzurek.net/2013/09/20/pointers-in-go.html
Well, probably because ResponseWriter is an interface, that is, in fact, it is the pointer that is passed.
And Request is a structure.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question