diff options
Diffstat (limited to 'commons/hash.go')
-rw-r--r-- | commons/hash.go | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/commons/hash.go b/commons/hash.go deleted file mode 100644 index 03fa53f..0000000 --- a/commons/hash.go +++ /dev/null @@ -1,17 +0,0 @@ -package commons - -import ( - "crypto/sha1" - "fmt" - "strconv" -) - -func GitHash(t string, b []byte) string { - h := []byte(t) - h = append(h, ' ') - h = strconv.AppendInt(h, int64(len(b)), 10) - h = append(h, 0) - h = append(h, b...) - - return fmt.Sprintf("%x", sha1.Sum(h)) -} |