An open API service indexing awesome lists of open source software.

https://github.com/flopp/go-filehash

Combute hash/checksum of files, insert file hash/checksum into file name
https://github.com/flopp/go-filehash

Last synced: 9 months ago
JSON representation

Combute hash/checksum of files, insert file hash/checksum into file name

Awesome Lists containing this project

README

          

# go-filehash
Compute hash/checksum of files, insert file hash/checksum into file name while copying

```
import "filehash"

hash, err := filehash.Compute("myfile.txt")
// Returns "95c39c37ef89acb2", nil

newName, err := filehash.Copy("myfile.txt", "out/myfile-HASH.txt", "HASH")
// Copies "myfile.txt" to "out/myfile-95c39c37ef89acb2.txt"
// Returns "out/myfile-95c39c37ef89acb2.txt", nil
```