test

package
v0.0.0-...-96f7096 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HttpServerWithHandlers

func HttpServerWithHandlers(t *testing.T, handlers []http.HandlerFunc) *httptest.Server

func NewTestHttpClient

func NewTestHttpClient(funcs ...RoundTripFunc) *http.Client

func Response

func Response(status string, body string) *http.Response

Types

type RoundTripFunc

type RoundTripFunc func(req *http.Request) *http.Response

type RoundTripper

type RoundTripper struct {
	// contains filtered or unexported fields
}

func (*RoundTripper) RoundTrip

func (r *RoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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