(b *testing.B)
| 1119 | } |
| 1120 | |
| 1121 | func BenchmarkLog(b *testing.B) { |
| 1122 | b.ReportAllocs() |
| 1123 | rh := handlerFunc(func(w http.ResponseWriter, r *http.Request) error { |
| 1124 | // Implicit 200 OK. |
| 1125 | return nil |
| 1126 | }) |
| 1127 | h := StdHandler(rh, HandlerOptions{}) |
| 1128 | req := httptest.NewRequest("GET", "/", nil) |
| 1129 | rw := new(httptest.ResponseRecorder) |
| 1130 | for range b.N { |
| 1131 | *rw = httptest.ResponseRecorder{} |
| 1132 | h.ServeHTTP(rw, req) |
| 1133 | } |
| 1134 | } |
| 1135 | |
| 1136 | func TestHTTPError_Unwrap(t *testing.T) { |
| 1137 | wrappedErr := fmt.Errorf("wrapped") |
nothing calls this directly
no test coverage detected
searching dependent graphs…