25 lines
336 B
Go
25 lines
336 B
Go
package q5
|
|
|
|
import (
|
|
"github.com/gomodule/redigo/redis"
|
|
)
|
|
|
|
type Redis struct {
|
|
host string
|
|
port int32
|
|
passwd string
|
|
conn *redis.Conn
|
|
}
|
|
|
|
func (this *Redis) Init(host string, port int32, passwd string) {
|
|
this.host = host
|
|
this.port = port
|
|
this.passwd = passwd
|
|
}
|
|
|
|
func (this *Redis) Open() {
|
|
}
|
|
|
|
func (this *Redis) Close() {
|
|
}
|