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