githelper

package
v1.4.452 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchFilesFromRepo

func FetchFilesFromRepo(opts FetchOptions) error

FetchFilesFromRepo clones a git repo and extracts files from a specific folder. It tries go-git first, and falls back to the git CLI if available.

Types

type FetchOptions

type FetchOptions struct {
	// RepoURL is the URL of the git repository
	RepoURL string

	// PathPrefix is the folder within the repo to extract (e.g. "patterns/")
	PathPrefix string

	// DestDir is where the files will be saved locally
	DestDir string

	// SingleDirectory if true, only fetch files directly in the specified directory
	// without recursing into subdirectories
	SingleDirectory bool
}

FetchOptions defines options for fetching files from a git repo

Jump to

Keyboard shortcuts

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