modules

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirHash

func DirHash(m *Module) (string, error)

DirHash reads directory and produces its H1 hash. Note: remember to modify the go.mod file first before running this function.

func FetchDirectDeps

func FetchDirectDeps(mods []*Module)

func GoModHash

func GoModHash(data []byte) (string, error)

func UpdateGoMod

func UpdateGoMod(m *Module, dry bool) error

func UpdateGoSum

func UpdateGoSum(m *Module, dry bool) error

func UpdateVersion

func UpdateVersion(mods []*Module, version string) error

Types

type Module

type Module struct {
	Prefix      string
	FileName    string
	GoModHash   string
	DirHash     string
	License     string
	File        *modfile.File
	Deps        []*Module
	DepsVersion []string
	Sums        map[module.Version][]string
}

func All

func All(prefix string) ([]*Module, error)

func Filter added in v0.2.0

func Filter(mods []*Module, exclude []string) []*Module

Filter returns the subset of mods whose directory name is not listed in exclude. Directory names are matched verbatim (e.g. "architecture", "integration"). When exclude is empty, mods is returned unchanged.

Excluding a module that other kept modules depend on leaves those require statements untouched (they keep referencing the previous version); callers are expected to exclude only modules that are not part of the release graph.

func SortByDirectDeps

func SortByDirectDeps(nodes []*Module, maxIter int) ([]*Module, error)

func (*Module) Path

func (m *Module) Path() string

func (*Module) Version

func (m *Module) Version() string

Jump to

Keyboard shortcuts

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