git

package
v0.0.0-...-3fc36a1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is git client

func NewClient

func NewClient(cloneURL string) *Client

NewClient creates git client

func (*Client) Checkout

func (c *Client) Checkout(path, branch string) error

Checkout branch

func (*Client) CheckoutFile

func (c *Client) CheckoutFile(path, fileName, branch string) error

CheckoutFile of branch

func (*Client) Clone

func (c *Client) Clone(path string, hash *string) error

Clone a git repository

func (*Client) Merge

func (c *Client) Merge(path, target string) error

Merge a branch or hash

type Clienter

type Clienter interface {
	Clone(path string, hash *string) error
	Merge(path, branch string) error
	Checkout(path, branch string) error
	CheckoutFile(path, fileName, branch string) error
}

Clienter is interface of git client

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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