I'm getting a:
reflect.Value.Slice: slice of unaddressable array
Error when I'm trying to add a sha256 hash to a mongoDB with mgo. Other []bytes work fine.
hash := sha256.Sum256(data)
err := c.Col.Insert(bson.M{"id": hash})
Any idea what the problem might be? I know I could encode the hash as a string but that should not be necessary.