Commit 504fee0a authored by Juan Batiz-Benet's avatar Juan Batiz-Benet

leveldb: tpye assertion fix

parent 679addab
......@@ -33,8 +33,8 @@ func NewDatastore(path string, opts *Options) (*Datastore, error) {
// Note: using sync = false.
// see http://godoc.org/github.com/syndtr/goleveldb/leveldb/opt#WriteOptions
func (d *Datastore) Put(key ds.Key, value interface{}) (err error) {
val, failed := value.([]byte)
if failed {
val, ok := value.([]byte)
if !ok {
return ds.ErrInvalidType
}
return d.DB.Put(key.Bytes(), val, nil)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment