package modsum

Import Path
	go.pact.im/x/goship/internal/modsum (on go.dev)

Dependency Relation
	imports 17 packages, and imported by one package

Involved Source Files checksum.go Package modsum computes Go module zip and go.mod checksums locally from VCS tracked files and rewrites dependent go.mod and go.sum contents in-process. rewrite.go
Package-Level Type Names (total 4, in which 2 are exported)
/* sort exporteds by: | */
Checksums holds the canonical Go module zip and go.mod h1 checksums for a single module version. ModHash string Module string Version string ZipHash string func Compute(rootDir, modDir, modPath, ver string, tracked []vcs.FileEntry) (Checksums, error) func ComputeFS(fsys fs.FS, modDir, modPath, ver string, tracked []vcs.FileEntry) (Checksums, error) func RewriteModule(filename string, origMod, origSum []byte, updates map[string]Checksums) (RewriteResult, error) func UpdateModule(modAbsDir string, updates map[string]Checksums) ([]string, error)
RewriteResult holds the pure output of RewriteModule. GoMod []byte GoSum []byte ModChanged bool SumChanged bool func RewriteModule(filename string, origMod, origSum []byte, updates map[string]Checksums) (RewriteResult, error)
Package-Level Functions (total 8, in which 4 are exported)
Compute is a convenience wrapper around ComputeFS backed by os.DirFS(rootDir).
ComputeFS builds the canonical Go module zip for (modPath, ver) entirely in memory from fsys and computes both h1: checksums without touching disk or contacting any Go module proxy.
RewriteModule updates go.mod and go.sum bytes in memory for all required modules present in updates.
UpdateModule reads go.mod and go.sum from modAbsDir, applies RewriteModule, and writes back only the files that changed.