code: func (dbInst *DB) WriteBatch(batch *leveldb.Batch, sync bool) error {
  	wo := dbInst.writeOptsNoSync
  	if sync {
  		wo = dbInst.writeOptsSync
  	}
  	if err := dbInst.db.Write(batch, wo); err != nil {
  		return errors.Wrap(err, "error writing batch to leveldb")
  	}
  	return nil
  }
docs: // WriteBatch writes a batch