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