```
type target struct {
}
func test(ch chan *target){
a := target{}
fmt.Printf("test:%p\n", &a)
ch <- &a
}
func main() {
ch := make(chan *target)
go func() {
for {
a := <- ch
fmt.Printf("main:%p\n", &a)
}
}()
test(ch)
time.Sleep(time.Second*1)
}
```
有疑问加站长微信联系(非本文作者)