modcache

package
v0.0.0-...-e8e64b1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2026 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package modcache provides support for fetching packages from a local Go module cache.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Source

type Source struct {
	FS fs.FS
}

Source fetches Go modules from a local Go module cache.

func (*Source) Files

func (s *Source) Files(mod *internal.Module) (fs.FS, error)

Files returns the module's files.

func (*Source) Module

func (s *Source) Module(modulePath, version string) (*internal.Module, error)

Module fetches a module from the module cache. If the module is in the standard library, it is fetched from the local Go tree instead.

Jump to

Keyboard shortcuts

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