Documentation
¶
Overview ¶
Package stdmod redirects stdlib-shaped import paths to a std module hosted on the Go module proxy. The mvm binary embeds a proxy-format zip of this module as an offline floor.
Index ¶
Constants ¶
const ( ModulePath = "github.com/mvm-sh/std" Version = "v0.1.0" )
ModulePath and Version pin the std module shipped with mvm. The embedded src.zip must match these values so that modfs.Inject keys the module under the same path.
Variables ¶
This section is empty.
Functions ¶
func DefaultFS ¶
DefaultFS returns a stdlib redirect FS backed by an offline modfs pre-populated with the embedded std zip.
func FS ¶
FS returns an fs.FS that serves stdlib-shaped imports by rewriting them to "<modPath>/<path>" against the given backing modfs. Non-stdlib imports return fs.ErrNotExist.
func IsStdlibImport ¶
IsStdlibImport reports whether path looks like a Go stdlib import.
Types ¶
This section is empty.