MCPcopy
hub / github.com/redis/go-redis / ExampleClient_Incr

Function ExampleClient_Incr

example_test.go:237–245  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

235}
236
237func ExampleClient_Incr() {
238 result, err := rdb.Incr(ctx, "counter").Result()
239 if err != nil {
240 panic(err)
241 }
242
243 fmt.Println(result)
244 // Output: 1
245}
246
247func ExampleClient_BLPop() {
248 if err := rdb.RPush(ctx, "queue", "message").Err(); err != nil {

Callers

nothing calls this directly

Calls 2

ResultMethod · 0.65
IncrMethod · 0.65

Tested by

no test coverage detected