Help us shape the future of Go! Take the 2026 Go Developer Survey

execgit

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package execgit provides a git client adapter using exec.Command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecGitClient

type ExecGitClient struct{}

ExecGitClient implements ports.GitClient using exec.Command.

func New

func New() *ExecGitClient

New creates a new ExecGitClient adapter.

func (*ExecGitClient) GetHead

func (g *ExecGitClient) GetHead(repoPath string) string

GetHead returns the current HEAD commit hash for the repository. Returns empty string if not a git repo or on error.

func (*ExecGitClient) IsRepo

func (g *ExecGitClient) IsRepo(path string) bool

IsRepo checks if the given path is a git repository.

Jump to

Keyboard shortcuts

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