WaitGroup 去等待所有goroutine 執行完畢,之後再印出餘額。 func main() { var wg sync.WaitGroup b := &Bank{} wg.Add(3) go func() { b.
確定! 回上一頁