gitmock

package
v1.9.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ErrNotFound = internal.Error("not found")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MockGit

type MockGit struct {
	Smart bool
	// contains filtered or unexported fields
}

MockGit can be used to start a pretend git server for testing custom spack repos.

func New

func New() (*MockGit, string)

New returns a new MockGit that provides a git repo with a random number of random refs.

func (*MockGit) ServeHTTP

func (m *MockGit) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP is to implement http.Handler so you can httptest.NewServer(m).

Jump to

Keyboard shortcuts

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