tests

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeClient

type FakeClient struct {
	DoFuncReturns func(req *http.Request) (*http.Response, error)
}

FakeClient is the client to be mocked

func MockClient

func MockClient(do func(req *http.Request) (*http.Response, error)) FakeClient

MockClient will return an instance of a client with a mocked response

func (FakeClient) Do

func (f FakeClient) Do(req *http.Request) (*http.Response, error)

Do is the fake client's Do function

Jump to

Keyboard shortcuts

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