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