download

package
v0.0.0-...-5fe5d15 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: Apache-2.0 Imports: 8 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clean

func Clean(path string) string

Clean trims any URL parts, like the scheme or username, that might be present in a user-submitted URL

Types

type ProxyClient

type ProxyClient struct {
	URL string
}

ProxyClient is a client for the module proxy

func NewProxyClient

func NewProxyClient(url string) ProxyClient

NewProxyClient returns a new ProxyClient

func (*ProxyClient) LatestVersion

func (c *ProxyClient) LatestVersion(path string) (string, error)

LatestVersion gets the latest module version from the proxy

func (*ProxyClient) ModuleName

func (c *ProxyClient) ModuleName(path string) (string, error)

ModuleName gets the name of a module from the proxy

func (*ProxyClient) ProxyDownload

func (c *ProxyClient) ProxyDownload(path string) (string, error)

ProxyDownload downloads a package from proxy.golang.org

Jump to

Keyboard shortcuts

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