From 9852f5c7e0b1c8db930905148bb001315b1ac5b4 Mon Sep 17 00:00:00 2001 From: guzeng Date: Wed, 16 Jun 2021 15:45:26 +0800 Subject: [PATCH] =?UTF-8?q?redis=E6=93=8D=E4=BD=9C=E6=94=B9=E8=B0=83?= =?UTF-8?q?=E7=94=A8rpc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cache.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cache.go b/cache.go index 0ccbebb..4d2c0fb 100644 --- a/cache.go +++ b/cache.go @@ -4,7 +4,7 @@ import ( "encoding/json" "errors" - "git.tetele.net/tgo/redis" + "git.tetele.net/tgo/redisrpc" ) /** @@ -15,7 +15,7 @@ import ( func GetSiteFromRedis(host string) (map[string]string, error) { var site map[string]string = make(map[string]string) - info, err := redis.HGetString(SITE_KEY, host) + info, err := redisrpc.HGetString(SITE_KEY, host) if err != nil { return site, err } @@ -55,14 +55,14 @@ func SetToRedis(host string, site map[string]string) error { if err != nil { return err } - _, err = redis.HMSet(SITE_KEY, host, siteStr) + _, err = redisrpc.HSet(SITE_KEY, host, siteStr) return err } func GetAll() ([]map[string]string, error) { - list, err := redis.HGetAll(SITE_KEY) + list, err := redisrpc.HGetAll(SITE_KEY) if err != nil { return nil, err }