package main
import (
"fmt"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/v2/util/gconv"
)
func main() {
var (
ctx = gctx.New()
)
conn, _ := g.Redis().Conn(ctx)
defer conn.Close(ctx)
conn.Do(ctx, "SET", "k", "v")
v, _ := conn.Do(ctx,"GET", "k")
fmt.Println(gconv.String(v))
}