(w http.ResponseWriter, req *http.Request)
| 23 | } |
| 24 | |
| 25 | func headers(w http.ResponseWriter, req *http.Request) { |
| 26 | |
| 27 | // This handler does something a little more |
| 28 | // sophisticated by reading all the HTTP request |
| 29 | // headers and echoing them into the response body. |
| 30 | for name, headers := range req.Header { |
| 31 | for _, h := range headers { |
| 32 | fmt.Fprintf(w, "%v: %v\n", name, h) |
| 33 | } |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | func main() { |
| 38 |
nothing calls this directly
no outgoing calls
no test coverage detected