func (d *Failstore) Put(ctx context.Context, k ds.Key, val []byte) error {
	err := d.errfunc("put")
	if err != nil {
		return err
	}
	return d.child.Put(ctx, k, val)
}
Put puts a key/value into the datastore.
package failstore
import (
	"context"
	ds "github.com/ipfs/go-datastore"
	dsq "github.com/ipfs/go-datastore/query"
)
type Failstore struct {
	child   ds.Datastore
	errfunc func(string) error
}
func NewFailstore(c ds.Datastore, efunc func(string) error) *Failstore {
	return &Failstore{
		child:   c,
		errfunc: efunc,
	}
}