package hashmap type hmBucket struct { data []bucketNode } type bucketNode struct { hash uint key, value interface{} } func newBucket() *hmBucket { return &hmBucket{} } func (bkt *hmBucket) Add(hash uint, k, v interface{}) { bkt.data = append(bkt.data, bucketNode{key: k, value: v, hash: hash}) }