package modload

import "cuelang.org/go/internal/mod/modload"

Index

Functions

func Tidy

func Tidy(ctx context.Context, fsys fs.FS, modRoot string, reg Registry, cueVers string) (*modfile.File, error)

Tidy evaluates all the requirements of the given main module, using the given registry to download requirements and returns a resolved and tidied module file. If there's no language version in the module file and cueVers is non-empty it will be used to populate the language version field.

Types

type Registry

type Registry interface {
	modrequirements.Registry
	modpkgload.Registry
	// ModuleVersions returns all the versions for the module with the
	// given path, which should contain a major version.
	ModuleVersions(ctx context.Context, mpath string) ([]string, error)
}

Registry is modload's view of a module registry.

Source Files

load.go query.go

Version
v0.8.0-alpha.3
Published
Feb 21, 2024
Platform
darwin/amd64
Imports
17 packages
Last checked
49 minutes ago

Tools for package owners.