Skip to content

Commit

Permalink
docs: add del function (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfyiamcool committed Aug 5, 2023
1 parent bd36c74 commit 03e80e1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,17 @@ if err != nil {
log.Printf("%s", val)
```

### Deleting from a database

Use the `DB.Delete()` function to delete a key-value pair:

```go
err := db.Delete([]byte("testKey"))
if err != nil {
log.Fatal(err)
}
```

### Iterating over items

To iterate over items, use `ItemIterator` returned by `DB.Items()`:
Expand Down

0 comments on commit 03e80e1

Please sign in to comment.