Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DirectoryHash ¶
DirectoryHash computes a hash of the directory contents using the standard dirhash.Hash1 algorithm. It supports filtering via exclude patterns (.dockerignore) and include filters (specific subdirectories). It processes up to maxFilesToRead files. If this limit is exceeded, it returns a warning error along with a partial hash computed from the first 5000 files.
The hash format is "h1:" followed by base64-encoded SHA-256, compatible with go.sum format.
Parameters:
- srcPath: The directory path to hash
- excludePatterns: Patterns to exclude from hashing (e.g., .dockerignore patterns)
- includeFiles: Specific files to include in the hash
Returns:
- hash: "h1:" format hash of the directory contents (may be partial if limit exceeded)
- error: nil on success, warning error if file limit exceeded, or actual error on failure
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.