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.

41 lines
654 B

  1. package redis
  2. import (
  3. // "strconv"
  4. "testing"
  5. // "tgo/helper"
  6. )
  7. func Test_HVals(t *testing.T) {
  8. ret3, err := HVals("sites")
  9. t.Log(ret3)
  10. t.Log(err)
  11. ret4, err := HKeys("sites")
  12. t.Log(ret4)
  13. t.Log(err)
  14. }
  15. func Test_HGetAllItem(t *testing.T) {
  16. RedisPassword = "123456"
  17. ret3, err := HGetAllItem("60007_config")
  18. t.Log(ret3)
  19. t.Log(err)
  20. }
  21. func Test_HMGet(t *testing.T) {
  22. RedisPassword = "123456"
  23. ret3, err := HMGetString("60007_config", "wx_mp_appsecret", "wx_mp_appid", "withdrawal_rate")
  24. t.Log(ret3)
  25. t.Log(err)
  26. }
  27. func Test_HGetAll(t *testing.T) {
  28. RedisPassword = "123456"
  29. ret3, err := HGetAll("60007_user")
  30. t.Log(ret3)
  31. t.Log(err)
  32. }