Documentation
¶
Overview ¶
Package hashfile computes a deterministic content+filename hash over a set of file paths, the shared hashing primitive behind pkg/runner/freshness's checksum.changed fact.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashFiles ¶
HashFiles computes a deterministic hash over paths: sorted first (so input order never affects the result), then path+content streamed into one sha256 digest (the path, not just its base name, is included so both a rename and a move between directories that share a filename are detected even when content is unchanged). Each record is length-prefixed (see writeRecord) so no concatenation of two records can ever collide with a different pair of path/content values. Returns the full hex-encoded digest; callers wanting a short prefix (e.g. cache keys) can slice it.
Types ¶
This section is empty.