TLDR Since map[[]byte]_ are not possible in go, use map[string]_ and index your byte slices using string(byteSlice). Need for byte slice map keys Go’s default hash.Hash interface returns hashes as slices of bytes. type Hash interface { // ... Sum(b []byte) []byte // ... } As we often use cryptographic hashes to identify complex objects, associative arrays with hashes as keys are needed to provide efficient insertion and retrieval of those objects.