mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Add SetEX command
This commit is contained in:
@ -188,6 +188,13 @@ func ExampleClient_Set() {
|
||||
}
|
||||
}
|
||||
|
||||
func ExampleClient_SetEX() {
|
||||
err := rdb.SetEX(ctx, "key", "value", time.Hour).Err()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func ExampleClient_Incr() {
|
||||
result, err := rdb.Incr(ctx, "counter").Result()
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user