gittest
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
- func CreateGitServer(t *testing.T, opts Options) *httptest.Server
- func NewRepo(t *testing.T, fs billy.Filesystem, commits ...CommitFunc) *git.Repository
- func NewServer(fs billy.Filesystem) http.Handler
- func NewServerSSH(t *testing.T, fs billy.Filesystem, pubkeys ...gossh.PublicKey) *transport.Endpoint
- func WriteFile(t *testing.T, fs billy.Filesystem, path, content string)
- type CommitFunc
- type Options
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
funcCreateGitServer¶
CreateGitServer creates a git repository with an in-memory filesystemand serves it over HTTP using a httptest.Server.
funcNewRepo¶
func NewRepo(t *testing.T, fs billy.Filesystem, commits ...CommitFunc) *git.Repository
NewRepo returns a new Git repository.
funcNewServer¶
NewServer returns a http.Handler that serves a git repository.It's expected that the repository is already initialized by the caller.