mirror of
https://gitee.com/johng/gf.git
synced 2024-12-04 13:18:01 +08:00
17 lines
245 B
Go
17 lines
245 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/gogf/gf/g"
|
|
)
|
|
|
|
func main() {
|
|
conn := g.Redis().Conn()
|
|
defer conn.Close()
|
|
if _, err := conn.Do("SET", "k", "v"); err != nil {
|
|
panic(err)
|
|
}
|
|
v, _ := conn.DoVar("GET", "k")
|
|
fmt.Println(v.String())
|
|
}
|