Help us shape the future of Go! Take the 2026 Go Developer Survey

treehash

package
v2.219.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package treehash digests a skill or source tree by content, so two copies of one commit compare equal. Extracted from the resolver when the catalogue superset needed the same rule to tell a duplicate from a collision.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Digest

func Digest(files fs.FS, root string) (string, error)

Digest hashes every file beneath root, path and length included, so a rename changes the result. A symlink is rejected rather than followed.

func NormalizeEOL

func NormalizeEOL(raw []byte) []byte

NormalizeEOL folds CRLF so two checkouts of one commit digest equal, and hashes raw when a NUL byte says the content is binary.

Types

This section is empty.

Jump to

Keyboard shortcuts

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