Documentation
¶
Index ¶
- func GitClone(url string, target string) error
- func IsRoot(filepath string) bool
- func IsURL(u string) bool
- func Max(a, b int) int
- func Min(a, b int) int
- func ParseURL(rawURL string) (u *url.URL, err error)
- func ReadJson(filepath string, v interface{}) error
- func RenderString(templateString string, funcMap template.FuncMap) (string, error)
- func RepoInfoFromURL(u *url.URL) (host string, owner string, name string, err error)
- func ResolvePath(filepath string) (string, error)
- type GitClient
- type Repository
- type RestClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderString ¶
func RepoInfoFromURL ¶
Extract GitHub repository information from a git remote URL.
func ResolvePath ¶
Types ¶
type GitClient ¶
type GitClient struct {
// contains filtered or unexported fields
}
func NewGitClient ¶
func (*GitClient) GetCurrentVersion ¶
getCurrentVersion determines the current version for non-local git extensions.
func (*GitClient) GetLatestVersion ¶
type Repository ¶
func ParseWithHost ¶
func ParseWithHost(s, host string) (repo Repository, err error)
Parse extracts the repository information from the following string formats: "OWNER/REPO", "HOST/OWNER/REPO", and a full URL. If the format does not specify a host, use the host provided.
func (Repository) FullName ¶
func (r Repository) FullName() string
func (Repository) Url ¶
func (r Repository) Url() string
type RestClient ¶
type RestClient struct {
// contains filtered or unexported fields
}
func NewGHClient ¶
func NewGHClient(host string) RestClient
func (RestClient) DoWithContext ¶
func (RestClient) Get ¶
func (c RestClient) Get(path string, resp interface{}) error
Click to show internal directories.
Click to hide internal directories.