From f75f77368093c6e6219e2f9b431683aa3a2ca75e Mon Sep 17 00:00:00 2001 From: Simon Lightfoot Date: Sun, 7 Aug 2016 00:28:59 +0100 Subject: [PATCH] ServeHTTP does not use pointer. --- Writing-a-Plugin:-HTTP-Middleware.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Writing-a-Plugin:-HTTP-Middleware.md b/Writing-a-Plugin:-HTTP-Middleware.md index 5cfeb5a..02203fc 100644 --- a/Writing-a-Plugin:-HTTP-Middleware.md +++ b/Writing-a-Plugin:-HTTP-Middleware.md @@ -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) } ```