Fixes
This commit is contained in:
parent
2e187300c6
commit
9394aeeb9d
2 changed files with 0 additions and 10 deletions
2
main.go
2
main.go
|
@ -4,7 +4,6 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/go-redis/redis"
|
|
||||||
"github.com/miekg/dns"
|
"github.com/miekg/dns"
|
||||||
"github.com/outout14/sacrebleu-dns/core"
|
"github.com/outout14/sacrebleu-dns/core"
|
||||||
"github.com/outout14/sacrebleu-dns/utils"
|
"github.com/outout14/sacrebleu-dns/utils"
|
||||||
|
@ -15,7 +14,6 @@ import (
|
||||||
//Global vars
|
//Global vars
|
||||||
var conf *utils.Conf
|
var conf *utils.Conf
|
||||||
var DB *sql.DB
|
var DB *sql.DB
|
||||||
var redisDb *redis.Client
|
|
||||||
|
|
||||||
//Main loop
|
//Main loop
|
||||||
func main() {
|
func main() {
|
||||||
|
|
|
@ -58,11 +58,3 @@ func redisSet(c *redis.Client, key string, ttl time.Duration, value interface{})
|
||||||
}
|
}
|
||||||
return c.Set(ctx, key, p, ttl).Err()
|
return c.Set(ctx, key, p, ttl).Err()
|
||||||
}
|
}
|
||||||
|
|
||||||
func redisGet(c *redis.Client, key string, dest interface{}) error {
|
|
||||||
p, err := c.Get(ctx, key).Result()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return json.Unmarshal([]byte(p), dest)
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue