initial code (#6)

* initial code commit
This commit is contained in:
l3uddz
2021-02-14 16:18:26 +00:00
committed by GitHub
parent 3f55336fbd
commit ce3807b819
53 changed files with 3694 additions and 0 deletions

15
cache/delete.go vendored Normal file
View File

@@ -0,0 +1,15 @@
package cache
import (
"fmt"
"github.com/xujiajun/nutsdb"
)
func (c *Client) Delete(bucket string, key string) error {
if err := c.db.Update(func(tx *nutsdb.Tx) error {
return tx.Delete(bucket, []byte(key))
}); err != nil {
return fmt.Errorf("%v: %v; delete: %w", bucket, key, err)
}
return nil
}