首页 > TAG信息列表 > 体传值
struct结构体传值
结构体是值传递 type Person struct { Name string } func TestStruct(t *testing.T) { var p = Person{ Name: "jack", } fmt.Printf("%p %s \n", &p, p.Name) P(p) fmt.Printf("%p %s \n", &p, p.Name)struct结构体传值
结构体是值传递 type Person struct { Name string } func TestStruct(t *testing.T) { var p = Person{ Name: "jack", } fmt.Printf("%p %s \n", &p, p.Name) P(p) fmt.Printf("%p %s \n", &p, p.Name)