type User struct {
Name string
Age int
}
func test1() (mapUser map[string]*User) {
mapUser = make(map[string]*User)
mapUser["xxx"] = &User{
Name: "test",
Age:18,
}
}
func test2() {
mapUser := test1()
fmt.Println(mapUser)
}
这样调用mapUser有问题吗