hashdir

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: MPL-2.0 Imports: 11 Imported by: 0

README

hashdir

Generate hash of all files and they paths for specified directory.

package main

import (
	"fmt"

	"github.com/gosimple/hashdir"
)

func main() {
	dirHash, err := hashdir.Make("./someDir/", "md5")
	fmt.Println(dirHash)
}

Supported hashes:

  • md5
  • sha1
  • sha256
  • sha512
Requests or bugs?

https://github.com/gosimple/hashdir/issues

Installation

go get -u github.com/gosimple/hashdir

License

The source files are distributed under the Mozilla Public License, version 2.0, unless otherwise noted. Please read the FAQ if you have further questions regarding the license.

Documentation

Overview

Package hashdir generate hash of all files and they paths for specified directory.

Example:

package main

import (
	"fmt"

	"github.com/gosimple/hashdir"
)

func main() {
	dirHash, err := hashdir.Make("./someDir/", "md5")
	fmt.Println(dirHash)
}

Requests or bugs?

https://github.com/gosimple/hashdir/issues

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Make

func Make(dir string, hashType string) (string, error)

Make generate hash of all files and they paths for specified directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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