Registry / testing / go-redis-redismock-v9

go-redis-redismock-v9

JSON →
library9.2.0gogounverified

A mock library for go-redis that allows testing Redis interactions without a real server.

go get github.com/go-redis/redismock/v9
INSTALL
IMPORT
SIG · GO-REDIS-REDISMOCK
G
go-redis-redismock-v9
testinggov9.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

redismock
✓ github.com/go-redis/redismock/v9

Create a mock Redis client and set expectations.

package main import ( "github.com/go-redis/redismock/v9" "github.com/go-redis/redis/v9" ) func main() { db, mock := redismock.NewClientMock() mock.ExpectGet("key").SetVal("value") val, _ := db.Get(ctx, "key").Result() _ = val }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
9.2.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
go-redis-redismock-v9 — go get go-redis-redismock-v9 · libregistry