merkletree

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

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