Versions in this module Expand all Collapse all v1 v1.21.0 Dec 26, 2023 Changes in this version + var ErrGoSumDirty = errors.New("updates to go.sum needed, disabled by -mod=readonly") + var ErrToolchain = errors.New("internal error: invalid operation on toolchain module") + var GoSumFile string + var HelpGoproxy = &base.Command + var HelpModuleAuth = &base.Command + var HelpPrivate = &base.Command + var WorkspaceGoSumFiles []string + func CachePath(ctx context.Context, m module.Version, suffix string) (string, error) + func Download(ctx context.Context, mod module.Version) (dir string, err error) + func DownloadDir(ctx context.Context, m module.Version) (string, error) + func DownloadZip(ctx context.Context, mod module.Version) (zipfile string, err error) + func GoMod(ctx context.Context, path, rev string) ([]byte, error) + func GoModFile(ctx context.Context, path, version string) (string, error) + func GoModSum(ctx context.Context, path, version string) (string, error) + func HaveSum(mod module.Version) bool + func LegacyGoMod(modPath string) []byte + func RemoveAll(dir string) error + func Reset() + func SideLock(ctx context.Context) (unlock func(), err error) + func Sum(ctx context.Context, mod module.Version) string + func TrimGoSum(keep map[module.Version]bool) + func TryProxies(f func(proxy string) error) error + func WriteGoSum(ctx context.Context, keep map[module.Version]bool, readonly bool) error + type DownloadDirPartialError struct + Dir string + Err error + func (e *DownloadDirPartialError) Error() string + func (e *DownloadDirPartialError) Is(err error) bool + type Repo interface + CheckReuse func(ctx context.Context, old *codehost.Origin) error + GoMod func(ctx context.Context, version string) (data []byte, err error) + Latest func(ctx context.Context) (*RevInfo, error) + ModulePath func() string + Stat func(ctx context.Context, rev string) (*RevInfo, error) + Versions func(ctx context.Context, prefix string) (*Versions, error) + Zip func(ctx context.Context, dst io.Writer, version string) error + func Lookup(ctx context.Context, proxy, path string) Repo + type RevInfo struct + Name string + Origin *codehost.Origin + Short string + Time time.Time + Version string + func InfoFile(ctx context.Context, path, version string) (*RevInfo, string, error) + type Versions struct + List []string + Origin *codehost.Origin