ServeHTTP does not use pointer.

Simon Lightfoot 2016-08-07 00:28:59 +01:00
parent 111de04802
commit f75f773680

@ -36,7 +36,7 @@ type MyHandler struct {
To implement the `httpserver.Handler` interface, we write a method called ServeHTTP. This method is the actual handler function, and, unless it fully handles the request by itself, it should call the next handler in the chain:
```go
func (h *MyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) {
func (h MyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) {
return h.Next.ServeHTTP(w, r)
}
```