Documentation
¶
Index ¶
- func DownloadFile(url *url.URL, proxyURL *url.URL, filePath path.Path, enableProgressBar bool) error
- func GenerateGitHubMirrorURL(url *gourl.URL, gitHubMirrorURL *gourl.URL) (*gourl.URL, error)
- func GenerateGoModuleVersionListURL(goModulePath string, goProxyURL *url.URL) (*url.URL, error)
- func GenerateGoModuleZipFileURL(goModulePath string, version semver.Version, goProxyURL *url.URL) (*url.URL, error)
- func GetContent(url *url.URL, proxyURL *url.URL) ([]byte, error)
- func IsGitHubDirectDownloadURL(url *gourl.URL) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadFile ¶
func DownloadFile(url *url.URL, proxyURL *url.URL, filePath path.Path, enableProgressBar bool) error
DownloadFile downloads a file from a url and saves it to a local path.
func GenerateGitHubMirrorURL ¶
GenerateGitHubMirrorURL generates a GitHub mirror URL from a GitHub URL.
func GenerateGoModuleVersionListURL ¶
GenerateGoModuleVersionListURL generates the URL of the version list of a Go module.
func GenerateGoModuleZipFileURL ¶
func GenerateGoModuleZipFileURL(goModulePath string, version semver.Version, goProxyURL *url.URL) (*url.URL, error)
GenerateGoModuleZipFileURL generates the URL of a Go module zip file.
func GetContent ¶
GetContent gets the content at once of a URL.
func IsGitHubDirectDownloadURL ¶ added in v0.20.0
IsGitHubDirectDownloadURL checks if a URL is a GitHub URL that can be directly downloaded.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.