func (m *MemStore) Close() error {
	m.mu.Lock()
	defer m.mu.Unlock()
	m.db = nil
	return nil
}
Close implements the Close interface
package store
import (
	"errors"
	"sync"
)
type MemStore struct {
	mu sync.RWMutex
	db map[string][]byte
}
func NewMemStore() (*MemStore, error) {
	db := make(map[string][]byte)
	ms := new(MemStore)
	ms.db = db
	return ms, nil
}
func (m *MemStore) Set(key string, data []byte) error {
	m.mu.Lock()
	defer m.mu.Unlock()
	m.db[key] = data
	return nil
}
func (m *MemStore) Get(key string) ([]byte, error) {
	m.mu.RLock()
	defer m.mu.RUnlock()
	data, ok := m.db[key]
	if !ok {
		return nil, errors.New(errNotExisted)
	}
	return data, nil
}
func (m *MemStore) Del(key string) error {
	m.mu.Lock()
	defer m.mu.Unlock()
	_, ok := m.db[key]
	if !ok {
		return errors.New(errNotExisted)
	}
	delete(m.db, key)
	return nil
}