Bytes6 returns the first 6 characters of the hash of b.
(b []byte)
| 27 | |
| 28 | // Bytes6 returns the first 6 characters of the hash of b. |
| 29 | func Bytes6(b []byte) string { |
| 30 | hash := Bytes(b) |
| 31 | return hash[:min(len(hash), 6)] |
| 32 | } |
| 33 | |
| 34 | // File returns a hex-encoded hash of a file's contents. |
| 35 | func File(path string) (string, error) { |