Intermediate Go (Golang)
Q83 / 100

What does http.Handler vs http.HandlerFunc distinguish?

Correct! Well done.

Incorrect.

The correct answer is B) http.Handler is an interface with ServeHTTP; http.HandlerFunc is a function type that implements Handler, allowing plain functions to serve as handlers

B

Correct Answer

http.Handler is an interface with ServeHTTP; http.HandlerFunc is a function type that implements Handler, allowing plain functions to serve as handlers

Explanation

http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { }) converts a function to an http.Handler by implementing ServeHTTP.

Progress
83/100