Help us shape the future of Go! Take the 2026 Go Developer Survey

testclient

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package testclient builds per-test HTTP clients that own their transport, so httptest.Server.Close (which closes idle conns on http.DefaultTransport) cannot break them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(tb testing.TB) *http.Client

New returns a client with a private transport and default redirect policy and no timeout, matching the stdlib default client. Idle connections are closed when tb finishes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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