diff --git a/myredis/redis_test.go b/myredis/redis_test.go index d4cbb39..9680d14 100644 --- a/myredis/redis_test.go +++ b/myredis/redis_test.go @@ -1,6 +1,7 @@ package myredis import ( + "context" "fmt" "testing" "time" @@ -22,14 +23,14 @@ func TestRedis(t *testing.T) { } defer redis.Close() - set, err := redis.Set("name", "qwe123", time.Minute) + set, err := redis.Set(context.Background(), "name", "qwe123", time.Minute).Result() if err != nil { fmt.Println(err) return } fmt.Println(set) - get, err := redis.Get("name") + get, err := redis.Get(context.Background(), "name").Result() if err != nil { fmt.Println(err) return