/valkey-skills:migrate-go-redis [API or pattern to migrate]from valkey-skills
Use when migrating Go from go-redis to Valkey GLIDE. Covers Result[T] nil handling, CGO dependency, PubSub, SetWithOptions, Alpine/MUSL gotchas. Not for greenfield Go apps - use valkey-glide-go instead.
Ships in valkey-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use when migrating a Go application from go-redis/redis to the GLIDE client library.
| Area | go-redis | GLIDE |
|---|---|---|
| Return types | *StatusCmd, *StringCmd with .Result() | models.Result[T] with .Value() and .IsNil() |
| Nil handling | redis.Nil sentinel error | val.IsNil() method |
| Configuration | redis.Options{} struct | config.NewClientConfiguration() builder chain |
| Multi-arg commands | Varargs: Del(ctx, "k1", "k2") | Slice args: Del(ctx, []string{"k1", "k2"}) |
| Expiry | Duration arg: Set(ctx, "k", "v", 60*time.Second) | SetWithOptions + options.SetOptions |
| Transactions | TxPipelined() closure | pipeline.NewStandaloneBatch(true) + client.Exec() |
| Pipelines | Pipelined() closure | pipeline.NewStandaloneBatch(false) + client.Exec() |
| Connection model | Pool with configurable size | Single multiplexed connection per node |
| API style | Synchronous with goroutine safety | Synchronous with goroutine safety (via CGO bridge) |
go-redis:
val, err := rdb.Get(ctx, "key").Result()
if err == redis.Nil {
fmt.Println("key does not exist")
} else if err != nil {
fmt.Println("error:", err)
} else {
fmt.Println("value:", val)
}
GLIDE:
val, err := client.Get(ctx, "key")
if err != nil {
fmt.Println("error:", err)
return
}
if val.IsNil() {
fmt.Println("key does not exist")
} else {
fmt.Println("value:", val.Value())
}
go-redis uses redis.Nil as an error sentinel for missing keys. GLIDE separates nil from errors - err is only for actual errors, val.IsNil() checks for key absence.
go-redis:
rdb := redis.NewClient(&redis.Options{Addr: "localhost:6379", Password: "", DB: 0})
GLIDE:
cfg := config.NewClientConfiguration().
WithAddress(&config.NodeAddress{Host: "localhost", Port: 6379})
client, err := glide.NewClient(cfg)
defer client.Close()
| go-redis field | GLIDE equivalent |
|---|---|
Addr: "host:port" | WithAddress(&config.NodeAddress{Host, Port}) |
Password | WithCredentials(&config.ServerCredentials{Password: "..."}) |
DB | WithDatabaseId(0) |
DialTimeout | WithRequestTimeout(ms) |
TLSConfig | WithUseTLS(true) |
PoolSize | Not needed - single multiplexed connection |
MaxRetries | Built-in reconnection via WithReconnectStrategy |
No drop-in compatibility layer exists for Go. Migration approach:
github.com/valkey-io/valkey-glide/go/v2 to your go.mod alongside go-redisredis.Nil error checks with Result[T].IsNil() at each call sitego-redis from go.mod once all implementations are migrated| Topic | File |
|---|---|
| Command-by-command API mapping (strings, hashes, lists, sets, sorted sets, delete, exists, cluster) | api-mapping |
| Transactions, pipelines, Pub/Sub, Go API maturity timeline | advanced-patterns |
Result[T] instead of redis.Nil. Check IsNil() before calling Value().[]string slices.Set and SetWithOptions. go-redis combines expiry into Set(). GLIDE has separate methods.musl build tag: export GOFLAGS=-tags=musl.PoolSize, MinIdleConns configuration.github.com/valkey-io/valkey-glide/go/v2 with subpackages config, options, pipeline, models, constants.go mod vendor support. Added in GLIDE 2.2 - earlier versions did not work with vendor mode.What SKILL.md sets; muted values are Claude Code's defaults
15 skills in this plugin
/glide-devUse when contributing to the GLIDE client - Rust core internals, language bindings (PyO3/JNI/NAPI/CGO/FFI), protocol layer, PubSub synchronizer, cluster topology, and build system. For using GLIDE in apps, see valkey-glide instead./glide-mqUse when building message queues with glide-mq. Covers queue setup, producer/consumer patterns, job scheduling, workflows, batch processing, streaming, and suspend/resume. Not for migrating from BullMQ (migrate-bullmq) or Bee-Queue (migrate-bee)./migrate-ioredisUse when migrating Node.js from ioredis to Valkey GLIDE. Covers API mapping, creation-time PubSub, reversed publish args, Batch API, TypeScript types. Not for greenfield Node.js apps - use valkey-glide-nodejs instead.Other plugins' skills for the same job
Generated from the plugin's indexed repository (internet-dot/valkey-skills) — no native marketplace selected
npx claudepluginhub p/internet-dot-valkey-skills