To install the package, run:
go get github.com/go-zoox/kv
func TestMemoryKV(t *testing.T) {
m := kv.NewMemory()
if m.Size() != 0 {
t.Errorf("Expected size 0, got %d", m.Size())
}
m.Set("key", "value")
if m.Get("key") != "value" {
t.Error("Expected value to be 'value'")
}
if m.Size() != 1 {
t.Errorf("Expected size 1, got %d", m.Size())
}
}
- Memory
- Redis
- MongoDB
- SQLite
- FileSystem
- PostgreSQL
- MySQL
- DynamoDB
- JSONRPC
- srfrog/dict - Python-like dictionaries for Go
- adelowo/onecache - One caching API, Multiple backends
GoZoox is released under the MIT License.