go/src/cmd/go/internal/modfetch/proxy.go

var HelpGoproxy

var proxyOnce

type proxySpec

func proxyList() ([]proxySpec, error) {}

// TryProxies iterates f over each configured proxy (including "noproxy" and
// "direct" if applicable) until f returns no error or until f returns an
// error that is not equivalent to fs.ErrNotExist on a proxy configured
// not to fall back on errors.
//
// TryProxies then returns that final error.
//
// If GOPROXY is set to "off", TryProxies invokes f once with the argument
// "off".
func TryProxies(f func(proxy string) error) error {}

type proxyRepo

func newProxyRepo(baseURL, path string) (Repo, error) {}

func (p *proxyRepo) ModulePath() string {}

var errProxyReuse

func (p *proxyRepo) CheckReuse(ctx context.Context, old *codehost.Origin) error {}

// versionError returns err wrapped in a ModuleError for p.path.
func (p *proxyRepo) versionError(version string, err error) error {}

func (p *proxyRepo) getBytes(ctx context.Context, path string) ([]byte, error) {}

func (p *proxyRepo) getBody(ctx context.Context, path string) (r io.ReadCloser, redactedURL string, err error) {}

func (p *proxyRepo) Versions(ctx context.Context, prefix string) (*Versions, error) {}

func (p *proxyRepo) latest(ctx context.Context) (*RevInfo, error) {}

func (p *proxyRepo) latestFromList(ctx context.Context, allLine []string) (*RevInfo, error) {}

func (p *proxyRepo) Stat(ctx context.Context, rev string) (*RevInfo, error) {}

func (p *proxyRepo) Latest(ctx context.Context) (*RevInfo, error) {}

func (p *proxyRepo) GoMod(ctx context.Context, version string) ([]byte, error) {}

func (p *proxyRepo) Zip(ctx context.Context, dst io.Writer, version string) error {}

// pathEscape escapes s so it can be used in a path.
// That is, it escapes things like ? and # (which really shouldn't appear anyway).
// It does not escape / to %2F: our REST API is designed so that / can be left as is.
func pathEscape(s string) string {}