git

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Git

type Git interface {
	// Path - current git repo path
	Path() *string

	// Sync - Sync a git repo, clone if is a new one, update otherwise
	//       |bool| indicate that whether repo is updated
	Sync() (bool, error)
}

Git - a set of git commands to one git repository and one local path

func NewGoGit added in v1.4.0

func NewGoGit(logger dd.LevelLogger, config *GitConfig) Git

NewCLIGit - Init a new Git instance via cli git

type GitConfig added in v1.4.0

type GitConfig struct {
	URL     *string
	WorkDir *string
	Bare    bool
	Token   *string
}

GitConfig - configs relative with git

type GoGit added in v1.4.0

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

GoGit - a set of git commands via local cli git

func (*GoGit) Path added in v1.4.0

func (g *GoGit) Path() *string

Path - current git repo path

func (*GoGit) Sync added in v1.4.0

func (g *GoGit) Sync() (bool, error)

Sync - Sync a git repository, clone if is a new one, update otherwise

Jump to

Keyboard shortcuts

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