mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-04 15:58:13 +08:00
12 lines
377 B
Go
12 lines
377 B
Go
package testutil
|
|
|
|
import (
|
|
ds2 "github.com/ipfs/go-ipfs/thirdparty/datastore2"
|
|
"gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
|
|
syncds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore/sync"
|
|
)
|
|
|
|
func ThreadSafeCloserMapDatastore() ds2.ThreadSafeDatastoreCloser {
|
|
return ds2.CloserWrap(syncds.MutexWrap(datastore.NewMapDatastore()))
|
|
}
|