Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GitURLPatterns = []*regexp.Regexp{ regexp.MustCompile(`^https?://.*\.git/?$`), regexp.MustCompile(`^https?://github\.com/[^/]+/[^/]+/?$`), regexp.MustCompile(`^https?://gitlab\.com/[^/]+/[^/]+/?$`), regexp.MustCompile(`^https?://bitbucket\.org/[^/]+/[^/]+/?$`), regexp.MustCompile(`^git@.*:.*\.git$`), regexp.MustCompile(`^ssh://git@.*/.*/.*\.git$`), }
GitURLPatterns contains regex patterns to detect Git URLs
Functions ¶
func CloneRepository ¶
CloneRepository clones a Git repository to a temporary directory Returns the path to the cloned directory and a cleanup function
func GetRepoName ¶
GetRepoName extracts a repository name from a Git URL for display purposes
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.