Hacker News new | ask | show | jobs
by bumpa 868 days ago
The encode example contains a bug and a lint issue. Firstly, calling w.Header().Set after w.WriteHeader is likely a bug, as the w.WriteHeader method call should occur after setting the headers.

The second issue involves passing an unused *http.Request, which will likely cause the linter to flag it.