cloner

package
v0.3.8-beta Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: BSD-2-Clause-Patent Imports: 15 Imported by: 0

Documentation

Overview

Package cloner provides support for cloning git repositories.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCache

func NewCache(cloner Cloner) *cacheCloner

Types

type Cloner

type Cloner interface {
	// Clone a repository.
	Clone(context.Context, Params) error
}

Cloner clones a repository.

func New

func New(depth int, stdout io.Writer) Cloner

New returns a new cloner.

func NewDefault

func NewDefault() Cloner

NewDefault returns a cloner with default settings.

type Params

type Params struct {
	Repo string
	Ref  string
	Sha  string
	Dir  string // Target clone directory.
}

Params provides clone params.

Jump to

Keyboard shortcuts

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