```
var wg sync.WaitGroup
func changePoint(count *int) {
defer wg.Done()
nowVal := 7
count = &nowVal
}
func ExampleGoroutine(orgId string) {
initVal := 5
count := &initVal
wg.Add(1)
go changePoint(count)
wg.Wait()
fmt.Println(*count)
}
```
为什么指针指向没有发生改变呢?
有疑问加站长微信联系(非本文作者)