gitscm

package
v0.0.0-...-f4cebfc Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Refer to: - https://github.com/src-d/go-git - https://github.com/src-d/go-git/blob/master/_examples/clone/main.go"

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilPointer error = errors.New("client is nil")

	ErrRepoURLNotSpecified       error = errors.New("URL not specified")
	ErrRepoDirectoryNotSpecified error = errors.New("Local directory not specified")
)

Functions

This section is empty.

Types

type Client

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

func New

func New(optFns ...GitClientOptFn) (*Client, error)

func (*Client) Clone

func (client *Client) Clone(url, directory string) error

type GitClientOptFn

type GitClientOptFn func(*Client) error

func CloneOptRecursionSubmodulesDepth

func CloneOptRecursionSubmodulesDepth(resursiveDepth int) GitClientOptFn

func CloneOptStateReader

func CloneOptStateReader(reader io.Reader) GitClientOptFn

func CloneOptsCommitsLimit

func CloneOptsCommitsLimit(limitDepth int) GitClientOptFn

Limit commits number

func CloneOptsReferenceName

func CloneOptsReferenceName(refName string) GitClientOptFn

Branch, Tag, commit Hash to clone, default is master/HEAD

func CloneOptsSingleBranchOnly

func CloneOptsSingleBranchOnly(singleBranch bool) GitClientOptFn

If true, only clone single branch

type Interface

type Interface interface {
	Clone(url, directory string) error
}

Directories

Path Synopsis
Refer to: - https://github.com/google/go-github
Refer to: - https://github.com/google/go-github

Jump to

Keyboard shortcuts

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