func TestWithHTTP1(t *testing.T) { … } func TestWithHTTP2(t *testing.T) { … } func TestGetOriginal(t *testing.T) { … } func newServer(t *testing.T, h http.Handler, http2 bool) *httptest.Server { … } func sendRequest(t *testing.T, server *httptest.Server) { … } func assertCloseNotifierFlusherHijacker(t *testing.T, hijackableExpected bool, w http.ResponseWriter) { … } type counter … func (c *counter) assert(t *testing.T, expected *counter) { … } type fakeResponseWriterDecorator … func (fw *fakeResponseWriterDecorator) Unwrap() http.ResponseWriter { … } func (fw *fakeResponseWriterDecorator) Flush() { … } func (fw *fakeResponseWriterDecorator) Hijack() (net.Conn, *bufio.ReadWriter, error) { … } func (fw *fakeResponseWriterDecorator) CloseNotify() <-chan bool { … }