Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCurrentVersion ¶
GetCurrentVersion returns the highest known version of the specified module, as returned by the system's module proxy.
func GetModFile ¶
GetModFile uses the provided getter instance to retrieve the go.mod file for the specified module by querying the system Go module proxy ($GOPROXY)
Types ¶
type Getter ¶
Getter defines a type, such as http.Client, that can perform an HTTP GET request and return the result.
This interface is defined so that consumers and tests can provide potentially customized implementations, but http.DefaultClient (or some other constructed http.Client instance) will likely be the most common implementation used.
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
Proxy wraps a Getter and a list of proxy URLs to provide the required module proxy operations
func New ¶
New returns a Proxy instance that will use g to execute HTTP requests against the module proxies in urls.
func NewFromEnv ¶
NewFromEnv returns a Proxy instance that will use g to execute HTTP requests against the module proxies configured in the system environment
func (Proxy) GetCurrentVersion ¶
GetCurrentVersion returns the highest known version of the specified module, as returned by list of module proxies configured on p.
func (Proxy) GetModFile ¶
GetModFile retrieves the go.mod file for the specified module by querying the list of module proxies configured on p.