Documentation ¶
Index ¶
- func DownloadFile(url string, filename string) error
- func GetTopVersions(versions []*semver.Version) ([]*semver.Version, error)
- func GetVersions(tags []Tag) ([]*semver.Version, error)
- func ProjectGitInit(projectName string) error
- func VersionsToStrings(versions []*semver.Version) []string
- type HTTPClient
- type Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadFile ¶
DownloadFile download a file from given URL and writes it to the given filename
func GetTopVersions ¶
GetTopVersions return all major and minor versions Only the highest patch version is taken
func GetVersions ¶
GetVersions convert Tag into semver Version
func ProjectGitInit ¶
ProjectGitInit initialize a git project
func VersionsToStrings ¶
VersionsToStrings convert semver Versions into a array of strings
Types ¶
type HTTPClient ¶
HTTPClient is an abstraction of the default HTTP client. Mainly used to ease testing.
var ( // GitClient is the client config for HTTP request GitClient HTTPClient = &http.Client{Timeout: 30 * time.Second} )
type Tag ¶
type Tag struct { Name string `json:"name"` ZipballURL string `json:"zipball_url"` TarballURL string `json:"tarball_url"` Commit struct { SHA string `json:"sha"` URL string `json:"url"` } `json:"commit"` NodeID string `json:"node_id"` }
Tag represent github api response
func GetAllTags ¶
GetAllTags return all Goyave tags registered inside Github API
func GetTagByName ¶
GetTagByName search a tag from a string version and a list of tags
Click to show internal directories.
Click to hide internal directories.