diff --git a/content/develop/clients/go/_index.md b/content/develop/clients/go/_index.md index 690f449a2e..b415ffb12e 100644 --- a/content/develop/clients/go/_index.md +++ b/content/develop/clients/go/_index.md @@ -100,7 +100,7 @@ hashFields := []string{ "price", "4972", } -res1, err := rdb.HSet(ctx, "bike:1", hashFields).Result() +res1, err := client.HSet(ctx, "bike:1", hashFields).Result() if err != nil { panic(err) @@ -108,7 +108,7 @@ if err != nil { fmt.Println(res1) // >>> 4 -res2, err := rdb.HGet(ctx, "bike:1", "model").Result() +res2, err := client.HGet(ctx, "bike:1", "model").Result() if err != nil { panic(err) @@ -116,7 +116,7 @@ if err != nil { fmt.Println(res2) // >>> Deimos -res3, err := rdb.HGet(ctx, "bike:1", "price").Result() +res3, err := client.HGet(ctx, "bike:1", "price").Result() if err != nil { panic(err) @@ -124,7 +124,7 @@ if err != nil { fmt.Println(res3) // >>> 4972 -res4, err := rdb.HGetAll(ctx, "bike:1").Result() +res4, err := client.HGetAll(ctx, "bike:1").Result() if err != nil { panic(err) @@ -148,7 +148,7 @@ type BikeInfo struct { } var res4a BikeInfo -err = rdb.HGetAll(ctx, "bike:1").Scan(&res4a) +err = client.HGetAll(ctx, "bike:1").Scan(&res4a) if err != nil { panic(err) @@ -171,15 +171,15 @@ import ( "github.com/redis/go-redis/extra/redisotel/v9" ) -rdb := redis.NewClient(&redis.Options{...}) +client := redis.NewClient(&redis.Options{...}) // Enable tracing instrumentation. -if err := redisotel.InstrumentTracing(rdb); err != nil { +if err := redisotel.InstrumentTracing(client); err != nil { panic(err) } // Enable metrics instrumentation. -if err := redisotel.InstrumentMetrics(rdb); err != nil { +if err := redisotel.InstrumentMetrics(client); err != nil { panic(err) } ```