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 ¶
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 ¶
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.
Click to show internal directories.
Click to hide internal directories.