Files
origin/sysmodule/RedisModule_test.go
2019-02-01 15:25:04 +08:00

25 lines
430 B
Go

package sysmodule
import (
"fmt"
"testing"
)
func TestRedisModule(t *testing.T) {
var cfg ConfigRedis
var module RedisModule
cfg.IP = "192.168.0.5"
cfg.Password = ""
cfg.Port = "6379"
cfg.IdleTimeout = 2
cfg.MaxActive = 3
cfg.MaxIdle = 3
cfg.DbIndex = 15
module.Init(&cfg)
module.SetRedisHash("rediskey", "hashkey", "1111")
ret, err := module.GetRedisHashValueByKey("rediskey", "hashkey")
fmt.Print(ret, err)
}