modulehash

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package modulehash computes the Go publication hashes of tracked module files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hashes

func Hashes(root, dir string, mod module.Version, overlay map[string][]byte) (zipHash, modHash string, err error)

Hashes returns the module zip and go.mod h1 hashes using Go's module zip rules. Overlay keys are slash-separated paths relative to root; only tracked files participate, with working-tree bytes unless an overlay supplies planned bytes.

func ModuleFiles

func ModuleFiles(root, dir string, overlay map[string][]byte) ([]modzip.File, error)

ModuleFiles lists the tracked files of the module at root/dir as module zip inputs, with the overlay semantics of Hashes. The list includes files that Go's zip rules later omit, such as nested modules; modzip.CheckFiles and modzip.Create apply those rules.

func TrackedFiles

func TrackedFiles(dir string) ([]string, error)

TrackedFiles lists Git-tracked paths relative to dir. Outside a Git checkout, it lists all files: a release source archive is already tracked-only.

Types

This section is empty.

Jump to

Keyboard shortcuts

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