Documentation
¶
Index ¶
- func CloneRepository[T ~string](locator T, funcs ...fnOpt) (fs.FS, error)
- func CopyFile[T ~string](locator T, w io.Writer, funcs ...fnOpt) error
- func Download[T ~string](locator T, localDir string, funcs ...fnOpt) error
- func WithClonePath(path string) fnOpt
- func WithRefAsBranch(sino bool) fnOpt
- type Components
- type Locator
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloneRepository ¶
CloneRepository clones the repository defined by the locator to a path.
func CopyFile ¶
CopyFile downloads a file specified by the VCS locator and copies it to an io.Writer.
func WithClonePath ¶
func WithClonePath(path string) fnOpt
WithClonePath specifies the directory to clone the repository. When
func WithRefAsBranch ¶
func WithRefAsBranch(sino bool) fnOpt
WithRefAsBranch instructs the parser to treat the ref as branch name instead of a tag name.
Types ¶
type Components ¶
type Components struct { Tool string Transport string Hostname string RepoPath string RefString string Commit string Tag string Branch string SubPath string }
func (*Components) RepoURL ¶
func (c *Components) RepoURL() string
RepoURL forms the repository URL to clone based on the defined components
Click to show internal directories.
Click to hide internal directories.