network

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

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

func GenerateGitHubMirrorURL(url *gourl.URL, gitHubMirrorURL *gourl.URL) (*gourl.URL, error)

GenerateGitHubMirrorURL generates a GitHub mirror URL from a GitHub URL.

func GenerateGoModuleVersionListURL

func GenerateGoModuleVersionListURL(goModulePath string, goProxyURL *url.URL) (*url.URL, error)

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

func GetContent(url *url.URL, proxyURL *url.URL) ([]byte, error)

GetContent gets the content at once of a URL.

func IsGitHubDirectDownloadURL added in v0.20.0

func IsGitHubDirectDownloadURL(url *gourl.URL) bool

IsGitHubDirectDownloadURL checks if a URL is a GitHub URL that can be directly downloaded.

Types

This section is empty.

Jump to

Keyboard shortcuts

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