gitutil

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneRepo

func CloneRepo(gitURL string, opts CloneOptions) (string, error)

CloneRepo clones a git URL into the configured storage directory. Returns the absolute path to the cloned directory.

func GitURLToDirName

func GitURLToDirName(rawURL string) (string, error)

GitURLToDirName derives a filesystem-safe directory name from a git URL. e.g. "https://github.com/juice-shop/juice-shop" -> "github.com_juice-shop_juice-shop"

func LooksLikeGitURL

func LooksLikeGitURL(s string) bool

LooksLikeGitURL returns true if the value looks like a git URL rather than a local path.

Types

type CloneOptions

type CloneOptions struct {
	StoragePath string // base directory for cloned repos
	CloneDepth  int    // git clone --depth value (default: 1)
	Branch      string // branch to clone (empty = default branch)
	AuthToken   string // if set, injected into HTTPS clone URLs for private repo access
}

CloneOptions configures a git clone operation.

Jump to

Keyboard shortcuts

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