Documentation ¶ Index ¶ Variables func New(ctx context.Context, dirPath string, factory HashFactory) ([]byte, error) type HashFactory Constants ¶ This section is empty. Variables ¶ View Source var ErrCancelled = errors.New("Cancelled") ErrCancelled is triggered when the calling context is closed. Functions ¶ func New ¶ func New( ctx context.Context, dirPath string, factory HashFactory, ) ([]byte, error) New hashes a directory by iterating over all files and nested files combining their individual digests into 1. Symlinks are not followed and there is no protection against a recursive symlink. Types ¶ type HashFactory ¶ type HashFactory func() hash.Hash HashFactory creates a new instance of hash.Hash Source Files ¶ View all Source files merkletree.go Click to show internal directories. Click to hide internal directories.