MockFetcher

package
v0.0.0-...-8c873f1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockFetcher

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

MockFetcher is a URL fetcher that uses a data structure to simulate pulling pages off the web.

func New

func New() *MockFetcher

New creates a properly-initialized MockFetcher.

func (*MockFetcher) Fetch

func (m *MockFetcher) Fetch(url string) (string, []string, error)

Fetch looks up a URL in the MockFetcher's map. Returns a fake page and URLs from it if found, error if not.

Jump to

Keyboard shortcuts

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