Skip to content

Commit

Permalink
Add package doc comment
Browse files Browse the repository at this point in the history
Also adds a TODO and improves clarity of internal package comments.
  • Loading branch information
wafer-bw committed Aug 27, 2024
1 parent 51924bd commit 5ba2d52
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions memkv/internal/underlying/underlying.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
// Package underlying provides the underlying data structures for the key-value
// store.
//
// This makes it easy to extend out the data structures in the future and
// enables easy testing of the store's underlying data via memkv.Store.Data
// (see memkv_export_test.go).
package underlying

// Item is a wrapper around the instances of data to be stored allowing for
Expand Down
2 changes: 2 additions & 0 deletions memkv/memkv.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Package memkv provides a generic in-memory key-value store.
package memkv

import (
Expand All @@ -8,6 +9,7 @@ import (

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

0 comments on commit 5ba2d52

Please sign in to comment.