Documentation ¶
Index ¶
- func CheckoutRepositoryTag(repo *git.Repository, tag string) error
- func CloneRepository(ctx context.Context, path, repositoryURL string) error
- func CopyFile(src, dest string) error
- func FetchRepositoryTags(ctx context.Context, path string) error
- func FileExists(path string) bool
- func InStrings(subject string, collection []string) bool
- func LoadRepository(path string) (*git.Repository, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckoutRepositoryTag ¶ added in v0.4.0
CheckoutRepositoryTag checkouts a repository tag by looking for the tag reference then calling the checkout function.
Calling This function is equivalent to executing `git checkout tags/$tag`
func CloneRepository ¶ added in v0.4.0
CloneRepository clones a git repository into a given directory.
Calling his function is equivalent to executing `git clone $repositoryURL $path`
func FetchRepositoryTags ¶ added in v0.4.0
FetchRepositoryTags fetches a repository remote tags.
Calling this function is equivalent to executing `git -C $path fetch --all --tags`
func FileExists ¶ added in v0.0.7
FileExists returns True if the supplied file path exists, false otherwise
func InStrings ¶
InStrings returns true if the subject string is contained in the supplied slice of strings
func LoadRepository ¶ added in v0.4.0
LoadRepository loads a repository from the local file system. TODO(a-hilaly): load repository into a memory filesystem (needs go1.16 migration or use somethign like https://github.com/spf13/afero
Types ¶
This section is empty.