utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneRepo

func CloneRepo(url string, dst string) (*git.Repository, error)

CloneRepo clones a repository from `url` into `dst`

func GetHeadHash

func GetHeadHash(repo *git.Repository) (string, error)

GetHeadHash returns the hash of of the HEAD reference commit

func RepoName

func RepoName(url url.URL) string

RepoName gives the name of the repository from a parsed Github URL

func RepoOwner

func RepoOwner(url url.URL) string

RepoOwner gives the owner of the repository from a parsed Github URL

func SplitUrlPath

func SplitUrlPath(url url.URL) []string

SplitUrlPath splits an url path into its parts

func ValidateRepoUrl

func ValidateRepoUrl(url url.URL) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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