go/src/cmd/go/internal/modfetch/repo.go

const traceRepo

type Repo

type Versions

type RevInfo

var lookupCache

type lookupCacheKey

// Lookup returns the module with the given module path,
// fetched through the given proxy.
//
// The distinguished proxy "direct" indicates that the path should be fetched
// from its origin, and "noproxy" indicates that the patch should be fetched
// directly only if GONOPROXY matches the given path.
//
// For the distinguished proxy "off", Lookup always returns a Repo that returns
// a non-nil error for every method call.
//
// A successful return does not guarantee that the module
// has any defined versions.
func Lookup(ctx context.Context, proxy, path string) Repo {}

var lookupLocalCache

// LookupLocal will only use local VCS information to fetch the Repo.
func LookupLocal(ctx context.Context, path string) Repo {}

// lookup returns the module with the given module path.
func lookup(ctx context.Context, proxy, path string) (r Repo, err error) {}

type lookupDisabledError

func (lookupDisabledError) Error() string {}

var errLookupDisabled

var errProxyOff

var errNoproxy

var errUseProxy

func lookupDirect(ctx context.Context, path string) (Repo, error) {}

func lookupCodeRepo(ctx context.Context, rr *vcs.RepoRoot, local bool) (codehost.Repo, error) {}

type loggingRepo

func newLoggingRepo(r Repo) *loggingRepo {}

// logCall prints a log message using format and args and then
// also returns a function that will print the same message again,
// along with the elapsed time.
// Typical usage is:
//
//	defer logCall("hello %s", arg)()
//
// Note the final ().
func logCall(format string, args ...any) func() {}

func (l *loggingRepo) ModulePath() string {}

func (l *loggingRepo) CheckReuse(ctx context.Context, old *codehost.Origin) (err error) {}

func (l *loggingRepo) Versions(ctx context.Context, prefix string) (*Versions, error) {}

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

func (l *loggingRepo) Latest(ctx context.Context) (*RevInfo, error) {}

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

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

type errRepo

func (r errRepo) ModulePath() string {}

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

func (r errRepo) Versions(ctx context.Context, prefix string) (*Versions, error) {}

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

func (r errRepo) Latest(ctx context.Context) (*RevInfo, error)                   {}

func (r errRepo) GoMod(ctx context.Context, version string) ([]byte, error)      {}

func (r errRepo) Zip(ctx context.Context, dst io.Writer, version string) error   {}

type notExistError

func notExistErrorf(format string, args ...any) error {}

func (e notExistError) Error() string {}

func (notExistError) Is(target error) bool {}

func (e notExistError) Unwrap() error {}