modules

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2025 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 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