git

package
v0.0.0-...-2bc86ad Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessToken

func AccessToken(token string) func(*Client) error

AccessToken sets the access token used to query the API

Types

type Client

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

Client provides a common interface to perform Git operations

func NewClient

func NewClient(options ...func(*Client) error) (*Client, error)

NewClient builds a new Git client

func (*Client) Clone

func (c *Client) Clone(url, reference, directory string, depth int) (*git.Repository, error)

Clone a repository to directory

func (*Client) Open

func (c *Client) Open(directory string) (*git.Repository, error)

Open a repository from disk

Jump to

Keyboard shortcuts

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