Skip to content

Commit 5ba2d52

Browse files
committed
Add package doc comment
Also adds a TODO and improves clarity of internal package comments.
1 parent 51924bd commit 5ba2d52

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Diff for: memkv/internal/underlying/underlying.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
// Package underlying provides the underlying data structures for the key-value
22
// store.
3+
//
4+
// This makes it easy to extend out the data structures in the future and
5+
// enables easy testing of the store's underlying data via memkv.Store.Data
6+
// (see memkv_export_test.go).
37
package underlying
48

59
// Item is a wrapper around the instances of data to be stored allowing for

Diff for: memkv/memkv.go

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package memkv provides a generic in-memory key-value store.
12
package memkv
23

34
import (
@@ -8,6 +9,7 @@ import (
89

910
// Store is a generic in-memory key-value store.
1011
type Store[K comparable, V any] struct {
12+
// TODO: should this be part of the underlying data?
1113
mu *sync.RWMutex
1214
capacity int
1315
data *underlying.Data[K, V]

0 commit comments

Comments
 (0)