gf/.example/other/test.go
2019-09-26 20:01:48 +08:00

19 lines
264 B
Go

package main
import (
"github.com/gogf/gf/container/gvar"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/util/gconv"
)
type User struct {
Uid int
Name *gvar.Var
}
func main() {
user := new(User)
user.Name = g.NewVar("john")
g.Dump(gconv.Map(user))
}