mock

package
v0.9.0-beta Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClient

type HTTPClient struct {
	Output func() (*http.Response, error)
}

HTTPClient is a mocked implementation of HTTPClient. By setting the Output field, clients have control over the Do method response.

func (*HTTPClient) Do

func (c *HTTPClient) Do(_ *http.Request) (*http.Response, error)

Do implements the HTTPClient interface.

Jump to

Keyboard shortcuts

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