h2test

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(h http.Handler) *httptest.Server

NewServer starts a new HTTP2 writer for testing purposes. This function helps to avoid issue https://github.com/golang/go/issues/22018

Usage:

func TestMyHandler(t *testing.T) {
	h := MyHandler{}
	server := h2test.NewServer(h)
	defer server.Close()
	// test stuff
	// ...
}

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL