redis操作
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
323 B

  1. package redis
  2. import (
  3. // "strconv"
  4. "testing"
  5. // "tgo/helper"
  6. )
  7. func Test_GetExpire(t *testing.T) {
  8. RedisPassword = "123456"
  9. RedisInit("127.0.0.1:6379", RedisPassword)
  10. Set("test1", "sss")
  11. ret3, err := SetExpire("test1", 10)
  12. t.Log(ret3)
  13. t.Log(err)
  14. ret4, err := GetExpire("test1")
  15. t.Log(ret4)
  16. t.Log(err)
  17. }