mock

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPReqDoer

type HTTPReqDoer struct {
	Hook func(*http.Request) (*http.Response, error)
}

HTTPReqDoer is a struct that can be used to mock an HTTP request Do method.

func (*HTTPReqDoer) Do

func (m *HTTPReqDoer) Do(r *http.Request) (*http.Response, error)

Do invokes the internal Hook to perform a call that resembles the http.Do function.

Jump to

Keyboard shortcuts

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